From: Daniele Ceraolo Spurio Date: Wed, 28 Aug 2024 21:51:55 +0000 (-0700) Subject: drm/xe/gsc: Fix FW status if the firmware is already loaded X-Git-Tag: v6.12-rc1~126^2~8^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7293859c51e1d7f923073aa46e2072333b3e143d;p=thirdparty%2Fkernel%2Fstable.git drm/xe/gsc: Fix FW status if the firmware is already loaded We set the FW status to "TRANSFERRED" after the load completes and to "RUNNING"once we're done with proxy init, so do the same if we're trying to re-load the FW and it is already loaded. Note that there is no difference in driver behavior between the 2 states, but it's useful to be accurate when we dump the status for debug. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: Julia Filipchuk Link: https://patchwork.freedesktop.org/patch/msgid/20240828215158.2743994-3-daniele.ceraolospurio@intel.com --- diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c index 9614d9e6617eb..6a94d51fb933b 100644 --- a/drivers/gpu/drm/xe/xe_gsc.c +++ b/drivers/gpu/drm/xe/xe_gsc.c @@ -531,7 +531,10 @@ void xe_gsc_load_start(struct xe_gsc *gsc) /* GSC FW survives GT reset and D3Hot */ if (gsc_fw_is_loaded(gt)) { - xe_uc_fw_change_status(&gsc->fw, XE_UC_FIRMWARE_TRANSFERRED); + if (xe_gsc_proxy_init_done(gsc)) + xe_uc_fw_change_status(&gsc->fw, XE_UC_FIRMWARE_RUNNING); + else + xe_uc_fw_change_status(&gsc->fw, XE_UC_FIRMWARE_TRANSFERRED); return; }