summaryrefslogtreecommitdiffstats
path: root/src/intel/common
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2017-06-01 16:36:39 -0700
committerAnuj Phogat <[email protected]>2017-06-02 16:21:56 -0700
commit0d576fbfbe912cf3fb9ab594bb31eb58bccf2138 (patch)
tree95cfbacc3b920c1b01488070155a4d9147510a00 /src/intel/common
parenteb23be1d97da290073d76c2510b8999b250f0139 (diff)
i965: Simplify l3 way size computations
By making use of l3_banks field in gen_device_info struct l3_way_size for gen7+ = 2 * l3_banks. V2: Keep the get_l3_way_size() function. Suggested-by: Francisco Jerez <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/intel/common')
-rw-r--r--src/intel/common/gen_l3_config.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/intel/common/gen_l3_config.c b/src/intel/common/gen_l3_config.c
index 0783217e676..e0825e92d9f 100644
--- a/src/intel/common/gen_l3_config.c
+++ b/src/intel/common/gen_l3_config.c
@@ -254,16 +254,8 @@ gen_get_l3_config(const struct gen_device_info *devinfo,
static unsigned
get_l3_way_size(const struct gen_device_info *devinfo)
{
- if (devinfo->is_baytrail)
- return 2;
-
- else if (devinfo->gt == 1 ||
- devinfo->is_cherryview ||
- devinfo->is_broxton)
- return 4;
-
- else
- return 8 * devinfo->num_slices;
+ assert(devinfo->l3_banks);
+ return 2 * devinfo->l3_banks;
}
/**