diff options
author | Jordan Justen <[email protected]> | 2020-06-08 03:19:08 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2020-06-22 11:41:59 -0700 |
commit | 6054b24f58451853391915208ba96d46605047ac (patch) | |
tree | e89d584936c949674cbbc2059fc3ab2cb99a4671 /src/intel/common | |
parent | 49fe43e15fdfc5be4523638776cb2a96f92e04f0 (diff) |
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 <[email protected]>
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4956>
Diffstat (limited to 'src/intel/common')
-rw-r--r-- | src/intel/common/gen_l3_config.c | 14 |
1 files 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; } |