From: Michal Wajdeczko Date: Mon, 8 Sep 2025 10:20:51 +0000 (+0200) Subject: drm/xe/guc: Always add CT disable action during second init step X-Git-Tag: v6.17.8~363 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4e7fda4891ffd31f7552445ee070c8d7c31cccd;p=thirdparty%2Fkernel%2Fstable.git drm/xe/guc: Always add CT disable action during second init step [ Upstream commit 955f3bc4af440bb950c7a1567197aaf6aa2213ae ] On DGFX, during init_post_hwconfig() step, we are reinitializing CTB BO in VRAM and we have to replace cleanup action to disable CT communication prior to release of underlying BO. But that introduces some discrepancy between DGFX and iGFX, as for iGFX we keep previously added disable CT action that would be called during unwind much later. To keep the same flow on both types of platforms, always replace old cleanup action and register new one. Signed-off-by: Michal Wajdeczko Cc: Satyanarayana K V P Cc: Matthew Brost Reviewed-by: Satyanarayana K V P Link: https://lore.kernel.org/r/20250908102053.539-2-michal.wajdeczko@intel.com Signed-off-by: Sasha Levin --- diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c index ff622628d823f..22eff8476ad48 100644 --- a/drivers/gpu/drm/xe/xe_guc_ct.c +++ b/drivers/gpu/drm/xe/xe_guc_ct.c @@ -300,12 +300,11 @@ int xe_guc_ct_init_post_hwconfig(struct xe_guc_ct *ct) xe_assert(xe, !xe_guc_ct_enabled(ct)); - if (!IS_DGFX(xe)) - return 0; - - ret = xe_managed_bo_reinit_in_vram(xe, tile, &ct->bo); - if (ret) - return ret; + if (IS_DGFX(xe)) { + ret = xe_managed_bo_reinit_in_vram(xe, tile, &ct->bo); + if (ret) + return ret; + } devm_release_action(xe->drm.dev, guc_action_disable_ct, ct); return devm_add_action_or_reset(xe->drm.dev, guc_action_disable_ct, ct);