drm/xe: Add support for OOB workarounds
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 26 May 2023 16:43:49 +0000 (09:43 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:34:03 +0000 (18:34 -0500)
commit9616e74b796c752ec29c3c83f3e33277d2b25b8e
treeaa77d04b262c23873d7ab3198024a073c696f985
parent464f2243c1fb139d8200e96648131197bf50fb27
drm/xe: Add support for OOB workarounds

There are WAs that, due to their nature, cannot be applied from a
central place like xe_wa.c. Those are peppered around the rest of the
code, as needed. Now they have a new name:  "out-of-band workarounds".

These workarounds have their names and rules still grouped in xe_wa.c,
inside the xe_wa_oob array, which is generated at compile time by
xe_wa_oob.rules and the hostprog xe_gen_wa_oob. The code generation
guarantees that the header xe_wa_oob.h contains the IDs for the
workarounds that match the index in the table. This way the runtime
checks that are spread throughout the code are simple tests against the
bitmap saved during initialization.

v2: Fix prev_name tracking not working when it's empty, i.e. when there
    is more than 1 continuation rule.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230526164358.86393-13-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/.gitignore
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_gen_wa_oob.c [new file with mode: 0644]
drivers/gpu/drm/xe/xe_gt.c
drivers/gpu/drm/xe/xe_gt_types.h
drivers/gpu/drm/xe/xe_wa.c
drivers/gpu/drm/xe/xe_wa.h
drivers/gpu/drm/xe/xe_wa_oob.rules [new file with mode: 0644]