]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Check for primary GT before looking up Wa_22019338487
authorMatt Roper <matthew.d.roper@intel.com>
Mon, 13 Oct 2025 20:09:55 +0000 (13:09 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Tue, 14 Oct 2025 14:44:58 +0000 (07:44 -0700)
commitd0ff153cca85520a2a14ee4edf44f6183b2e0e74
tree442ea71c613f5ac56a2b108c01b35bd0dcd0815a
parent999ef874c1458e54ce221fcf2674eeb7c29508d5
drm/xe: Check for primary GT before looking up Wa_22019338487

If the primary GT is disabled via configfs, we need to make sure that we
don't search for this workaround on a NULL xe_gt pointer.  Since we can
disable the primary GT only on igpu platforms, the media GT is the one
we'd want to check anyway for this workaround.

The ternary operators in ggtt_update_access_counter() were getting a bit
long/complicated, so rewrite them with regular if/else statements.
While we're at it, throw in a couple extra assertions to make sure that
we're truly picking the expected GT according to igpu/dgpu type.

v2:
 - Adjust indentation/wrapping; it's easier to read this with longer,
   unwrapped lines.  (Lucas)
 - Tweak wording of commit message to remove ambiguity.  (Gustavo)

Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20251013200944.2499947-37-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_ggtt.c