]> 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)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 4 Mar 2026 13:54:18 +0000 (08:54 -0500)
commitb3368ecca9538b88ddf982ea99064860fd5add97
tree064a69f88fedf6915799c335fb558a2561057ced
parenta99d34e5ecb9a8f2212ee5a01140313bb115f9be
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
(cherry picked from commit 2b37c401b265c07b46408b5cb36a4b757c9b5060)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_gsc_proxy.c
drivers/gpu/drm/xe/xe_gsc_types.h