[Mesa-dev] [PATCH V2 2/2] i965: Add a variable for size increment per bank in get_l3_way_size()
Anuj Phogat
anuj.phogat at gmail.com
Mon Jun 19 20:41:33 UTC 2017
Adding min_size_increment_per_bank variable better explains the
computation of L3 way size in the function.
V2: Use const variable for min_size_increment_per_bank.
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Cc: Francisco Jerez <currojerez at riseup.net>
---
src/intel/common/gen_l3_config.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/intel/common/gen_l3_config.c b/src/intel/common/gen_l3_config.c
index 44a4b24..9a7771a 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 min_size_increment_per_bank =
+ (devinfo->gen >= 9 && devinfo->l3_banks == 1) ? 4 : 2;
- return 2 * devinfo->l3_banks;
+ assert(devinfo->l3_banks);
+ return min_size_increment_per_bank * devinfo->l3_banks;
}
/**
--
2.9.4
More information about the mesa-dev
mailing list