diff options
author | Anuj Phogat <[email protected]> | 2017-06-10 15:48:21 -0700 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2017-06-20 12:18:26 -0700 |
commit | 1024dad4d936b6a618e58522071c37a0989832f1 (patch) | |
tree | 3e5d75b06960e2ee7f06b722874dfd354fc98ec6 | |
parent | 8521559e086a3d56f549962ab8e9f45a6a5989d8 (diff) |
i965: Add a variable for way size per bank in get_l3_way_size()
Adding this variable better explains the computation of L3 way
size in the function.
V2: Use const variable for way_size_per_bank.
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r-- | src/intel/common/gen_l3_config.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/intel/common/gen_l3_config.c b/src/intel/common/gen_l3_config.c index 150ec261a5f..21ee5ca5dca 100644 --- a/src/intel/common/gen_l3_config.c +++ b/src/intel/common/gen_l3_config.c @@ -271,12 +271,11 @@ gen_get_l3_config(const struct gen_device_info *devinfo, static unsigned get_l3_way_size(const struct gen_device_info *devinfo) { - assert(devinfo->l3_banks); - - if (devinfo->is_broxton) - return 4; + const unsigned way_size_per_bank = + devinfo->gen >= 9 && devinfo->l3_banks == 1 ? 4 : 2; - return 2 * devinfo->l3_banks; + assert(devinfo->l3_banks); + return way_size_per_bank * devinfo->l3_banks; } /** |