Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe: Bypass Wa_14018094691 when primary GT is disabled

Don't try to lookup Wa_14018094691 on a NULL GT when the primary GT is
disabled. Since this whole workaround centers around mid-thread
preemption behavior, the workaround isn't relevant if the primary GT
(where the engines that can do MTP live) is disabled.

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20251013200944.2499947-42-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

+2 -2
+2 -2
drivers/gpu/drm/xe/xe_gsc.c
··· 266 266 unsigned int fw_ref; 267 267 int ret; 268 268 269 - if (XE_GT_WA(tile->primary_gt, 14018094691)) { 269 + if (tile->primary_gt && XE_GT_WA(tile->primary_gt, 14018094691)) { 270 270 fw_ref = xe_force_wake_get(gt_to_fw(tile->primary_gt), XE_FORCEWAKE_ALL); 271 271 272 272 /* ··· 281 281 282 282 ret = gsc_upload(gsc); 283 283 284 - if (XE_GT_WA(tile->primary_gt, 14018094691)) 284 + if (tile->primary_gt && XE_GT_WA(tile->primary_gt, 14018094691)) 285 285 xe_force_wake_put(gt_to_fw(tile->primary_gt), fw_ref); 286 286 287 287 if (ret)