From 345c918a769191d6a6edabbef34006bea3ccc035 Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Fri, 8 Mar 2024 14:04:34 -0800 Subject: [PATCH] intel/dev: remove pci revision from shader cache key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pci revision was included in the shader cache key because it can enable platform workarounds. While some platform workarounds exist in the compiler, none are dependent on the silicon stepping. Many platforms differ only in the pci revision id, causing needless duplication in cache entries between platforms. When a platform ships publicly with stepping-specific compiler workarounds, pci id must be incorporated into the shader cache key. Reviewed-by: José Roberto de Souza Part-of: --- src/intel/dev/intel_device_info.c | 8 ++++++++ src/intel/dev/intel_device_info.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/intel/dev/intel_device_info.c b/src/intel/dev/intel_device_info.c index ba730a4798e..e42b9001141 100644 --- a/src/intel/dev/intel_device_info.c +++ b/src/intel/dev/intel_device_info.c @@ -1763,6 +1763,14 @@ intel_device_info_update_after_hwconfig(struct intel_device_info *devinfo) enum intel_wa_steppings intel_device_info_wa_stepping(struct intel_device_info *devinfo) { + /* When adding platforms to this function, check to see if + * stepping-specific workarounds impact the compiler. + * + * If a stepping specific compiler workaround is required on a released + * platform, intel_device_info->revision must be added as a + * 'compiler_field' in intel_device_info.py + */ + if (devinfo->platform == INTEL_PLATFORM_TGL) { /* TGL production steppings: B0 and C0 */ switch (devinfo->revision) { diff --git a/src/intel/dev/intel_device_info.py b/src/intel/dev/intel_device_info.py index 224c25b4593..d0587c1f79c 100644 --- a/src/intel/dev/intel_device_info.py +++ b/src/intel/dev/intel_device_info.py @@ -238,7 +238,7 @@ Struct("intel_device_info", Member("int", "verx10", compiler_field=True), - Member("int", "revision", compiler_field=True, + Member("int", "revision", comment=dedent("""\ This revision is from ioctl (I915_PARAM_REVISION) unlike pci_revision_id from drm device. Its value is not always