Module: Mesa
Branch: merge-requests/22351/head
Commit: 011b31c26d61fd8caf7de0a2991b4bbb099582f1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=011b31c26d61fd8caf7de0a2991b4bbb099582f1

Author: Mark Janes <[email protected]>
Date:   Thu Feb 16 16:12:43 2023 -0800

intel/dev: generate helpers to identify platform workarounds

Workarounds for defects in Intel silicon have been manually
implemented:

 - consult defect database for the current platform

 - add workaround code behind platform ifdef or devinfo->ver checks

Some bugs have occurred due to the manual process.  Typical failure
modes:

 - defect database is updated after a platform is enabled

 - version checks are overly broad (eg gfx11+) for defects that were
   fixed (eg in gfx12)

 - version checks are too narrow for defects that were extended to
   subsequent platforms.

 - missed workarounds

This commit automates workaround handling:

 - Internal automation queries the defect database to collate and
   summarize defect documentation in json.

 - mesa_defs.json describes all public defects and impacted platforms.
   Defects which are extended to subsequent platforms are listed under
   the original defect.

 - gen_wa_helpers.py generates workaround helpers to be called
   in place of version checks:

   - NEEDS_WORKAROUND_{ID} provides a compile time check suitable for
     use in genX routines.

   - intel_device_info_needs_wa() provides a more precise runtime
     check, differentiating platforms within a generation and
     platform steppings.

Internal automation will generate new mesa_defs.json as needed.
Workarounds enabled with these helpers will apply correctly based on
updated information in Intel's defect database.

Reviewed-by: Dylan Baker <dylan@pnwbakers>
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: José Roberto de Souza <[email protected]>
(back ported from commits 3c9a8f7a6d25c0d70351d3ea27930de74e6c94ba
                          52c71cf959b92b8eda18f9761ab01494b33a61af
                          8c78dd6320659889e5bdf09faeac393caec80b34
                          8eceff48cdb73d48a5db3c393eda60d099709845)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22351>

---

 src/intel/dev/gen_wa_helpers.py   |  315 ++++
 src/intel/dev/intel_device_info.c |   16 +
 src/intel/dev/intel_device_info.h |   15 +
 src/intel/dev/mesa_defs.json      | 3747 +++++++++++++++++++++++++++++++++++++
 src/intel/dev/meson.build         |   13 +-
 5 files changed, 4104 insertions(+), 2 deletions(-)

Diff:   
http://cgit.freedesktop.org/mesa/mesa/diff/?id=011b31c26d61fd8caf7de0a2991b4bbb099582f1

Reply via email to