From 7354d3a947945c4bd0fad9633a44bdc874923723 Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Thu, 4 Jan 2024 14:59:36 -0800 Subject: [PATCH] intel/dev: improve descriptions of workaround macros. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instructions for INTEL_WA_{num}_GFX_VER macros were confusing and contradicted itself. Acked-by: Caio Oliveira Acked-by: Lionel Landwerlin Acked-by: Tapani Pälli Part-of: --- src/intel/dev/gen_wa_helpers.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/intel/dev/gen_wa_helpers.py b/src/intel/dev/gen_wa_helpers.py index 6aeacd7b860..9ffa4e72f12 100644 --- a/src/intel/dev/gen_wa_helpers.py +++ b/src/intel/dev/gen_wa_helpers.py @@ -77,18 +77,20 @@ enum intel_workaround_id { INTEL_WA_NUM }; -/* These defines are used to identify when a workaround potentially applies - * in genxml code. They should not be used directly. intel_needs_workaround() - * checks these definitions to eliminate bitset tests at compile time. +/* These defines apply workarounds to a subset of platforms within a graphics + * generation. They must be used in conjunction with intel_needs_workaround() + * to check platform details. Use these macros to compile out genxml code on + * generations where it can never execute. Whenever possible, prefer use of + * INTEL_NEEDS_WA_{num} instead of INTEL_WA_{num}_GFX_VER */ % for a in wa_def: #define INTEL_WA_${a}_GFX_VER ${wa_macro[a]} % endfor -/* These defines are suitable for use to compile out genxml code using #if - * guards. Workarounds that apply to part of a generation must use a - * combination of run time checks and INTEL_WA_{NUM}_GFX_VER macros. Those - * workarounds are 'poisoned' below. +/* These defines may be used to compile out genxml workaround implementations + * using #if guards. If a definition has been 'poisoned' below, then it applies to a + * subset of a graphics generation. In that case, use INTEL_WA_{NUM}_GFX_VER macros + * in conjunction with calls to intel_needs_workaround(). */ % for a in partial_gens: % if partial_gens[a]: