Mesa (master): intel/l3: Allow platforms to have no l3 configurations
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 22 21:04:12 UTC 2020
Module: Mesa
Branch: master
Commit: 6054b24f58451853391915208ba96d46605047ac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6054b24f58451853391915208ba96d46605047ac
Author: Jordan Justen <jordan.l.justen at intel.com>
Date: Mon Jun 8 03:19:08 2020 -0700
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 <kenneth at whitecape.org>
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4956>
---
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;
}
More information about the mesa-commit
mailing list