]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe/gsc: Fix GSC proxy cleanup on early initialization failure
authorZhanjun Dong <zhanjun.dong@intel.com>
Fri, 20 Feb 2026 22:53:08 +0000 (17:53 -0500)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Mon, 2 Mar 2026 18:01:05 +0000 (10:01 -0800)
commit2b37c401b265c07b46408b5cb36a4b757c9b5060
treeaf2427604bd0608a9963b9cc5326b652cd476203
parentc692ae39e9fd33d0e58ac24bf3d98b352b5064da
drm/xe/gsc: Fix GSC proxy cleanup on early initialization failure

xe_gsc_proxy_remove undoes what is done in both xe_gsc_proxy_init and
xe_gsc_proxy_start; however, if we fail between those 2 calls, it is
possible that the HW forcewake access hasn't been initialized yet and so
we hit errors when the cleanup code tries to write GSC register. To
avoid that, split the cleanup in 2 functions so that the HW cleanup is
only called if the HW setup was completed successfully.

Since the HW cleanup (interrupt disabling) is now removed from
xe_gsc_proxy_remove, the cleanup on error paths in xe_gsc_proxy_start
must be updated to disable interrupts before returning.

Fixes: ff6cd29b690b ("drm/xe: Cleanup unwind of gt initialization")
Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patch.msgid.link/20260220225308.101469-1-zhanjun.dong@intel.com
drivers/gpu/drm/xe/xe_gsc_proxy.c
drivers/gpu/drm/xe/xe_gsc_types.h