]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe/guc: Fail immediately on GuC load error
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Tue, 3 Mar 2026 00:17:33 +0000 (16:17 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2026 10:13:32 +0000 (11:13 +0100)
commit50802d40964f327a6950562b62d1ebf7238a39fb
tree3fb0c73ede58e387e11328f50e7257578360673d
parentc92738fdbe74de582b20c2143847e55eecf4996a
drm/xe/guc: Fail immediately on GuC load error

[ Upstream commit 9b72283ec9b8685acdb3467de8fbc3352fdb70bb ]

By using the same variable for both the return of poll_timeout_us and
the return of the polled function guc_wait_ucode, the return value of
the latter is overwritten and lost after exiting the polling loop. Since
guc_wait_ucode returns -1 on GuC load failure, we lose that information
and always continue as if the GuC had been loaded correctly.

This is fixed by simply using 2 separate variables.

Fixes: a4916b4da448 ("drm/xe/guc: Refactor GuC load to use poll_timeout_us()")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patch.msgid.link/20260303001732.2540493-2-daniele.ceraolospurio@intel.com
(cherry picked from commit c85ec5c5753a46b5c2aea1292536487be9470ffe)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/xe_guc.c