From 6054b24f58451853391915208ba96d46605047ac Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 8 Jun 2020 03:19:08 -0700 Subject: [PATCH] intel/l3: Allow platforms to have no l3 configurations On some gen12 platforms we will use the L3FullWayAllocationEnable and never reconfigure the L3 setup. Suggested-by: Kenneth Graunke Signed-off-by: Jordan Justen Reviewed-by: Lionel Landwerlin Reviewed-by: Francisco Jerez Reviewed-by: Jason Ekstrand Part-of: --- src/intel/common/gen_l3_config.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/intel/common/gen_l3_config.c b/src/intel/common/gen_l3_config.c index 328aa5bebda..6bfcb6ba7d7 100644 --- a/src/intel/common/gen_l3_config.c +++ b/src/intel/common/gen_l3_config.c @@ -294,10 +294,15 @@ gen_get_default_l3_config(const struct gen_device_info *devinfo) * default configuration. */ const struct gen_l3_list *const list = get_l3_list(devinfo); - const struct gen_l3_config *const cfg = &list->configs[0]; - assert(cfg == gen_get_l3_config(devinfo, - gen_get_default_l3_weights(devinfo, false, false))); - return cfg; + assert(list->length > 0 || devinfo->gen >= 12); + if (list->length > 0) { + const struct gen_l3_config *const cfg = &list->configs[0]; + assert(cfg == gen_get_l3_config(devinfo, + gen_get_default_l3_weights(devinfo, false, false))); + return cfg; + } else { + return NULL; + } } /** @@ -323,6 +328,7 @@ gen_get_l3_config(const struct gen_device_info *devinfo, } } + assert(cfg_best || devinfo->gen >= 12); return cfg_best; } -- 2.30.2