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

drm/xe: Fix GT "for each engine" workarounds

Any rules using engine matching are currently broken due RTP processing
happening too in early init, before the list of hardware engines has been
initialised.

Fix this by moving workaround processing to later in the driver probe
sequence, to just before the processed list is used for the first time.

Looking at the debugfs gt0/workarounds on ADL-P we notice 14011060649
should be present while we see, before:

GT Workarounds
14011059788
14015795083

And with the patch:

GT Workarounds
14011060649
14011059788
14015795083

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: stable@vger.kernel.org # v6.11+
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250227101304.46660-2-tvrtko.ursulin@igalia.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 25d434cef791e03cf40680f5441b576c639bfa84)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

Tvrtko Ursulin and committed by
Rodrigo Vivi
54f94dc7 475d06e0

+2 -2
+2 -2
drivers/gpu/drm/xe/xe_gt.c
··· 380 380 if (err) 381 381 return err; 382 382 383 - xe_wa_process_gt(gt); 384 383 xe_wa_process_oob(gt); 385 - xe_tuning_process_gt(gt); 386 384 387 385 xe_force_wake_init_gt(gt, gt_to_fw(gt)); 388 386 spin_lock_init(&gt->global_invl_lock); ··· 472 474 } 473 475 474 476 xe_gt_mcr_set_implicit_defaults(gt); 477 + xe_wa_process_gt(gt); 478 + xe_tuning_process_gt(gt); 475 479 xe_reg_sr_apply_mmio(&gt->reg_sr, gt); 476 480 477 481 err = xe_gt_clock_init(gt);