Skip to content

Commit 59d3cfd

Browse files
dceraolojlahtine-intel
authored andcommitted
drm/i915: Do not attempt to load the GSC multiple times
If the GSC FW fails to load the GSC HW hangs permanently; the only ways to recover it are FLR or D3cold entry, with the former only being supported on driver unload and the latter only on DGFX, for which we don't need to load the GSC. Therefore, if GSC fails to load there is no need to try again because the HW is stuck in the error state and the submission to load the FW would just hang the GSCCS. Note that, due to wa_14015076503, on MTL the GuC escalates all GSCCS hangs to full GT resets, which would trigger a new attempt to load the GSC FW in the post-reset HW re-init; this issue is also fixed by not attempting to load the GSC FW after an error. Fixes: 15bd4a6 ("drm/i915/gsc: GSC firmware loading") Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Daniele Ceraolo Spurio <[email protected]> Cc: Alan Previn <[email protected]> Cc: John Harrison <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: <[email protected]> # v6.3+ Reviewed-by: Jonathan Cavitt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 03ded4d) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 431c164 commit 59d3cfd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ void intel_gsc_uc_load_start(struct intel_gsc_uc *gsc)
302302
{
303303
struct intel_gt *gt = gsc_uc_to_gt(gsc);
304304

305-
if (!intel_uc_fw_is_loadable(&gsc->fw))
305+
if (!intel_uc_fw_is_loadable(&gsc->fw) || intel_uc_fw_is_in_error(&gsc->fw))
306306
return;
307307

308308
if (intel_gsc_uc_fw_init_done(gsc))

drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ static inline bool intel_uc_fw_is_running(struct intel_uc_fw *uc_fw)
258258
return __intel_uc_fw_status(uc_fw) == INTEL_UC_FIRMWARE_RUNNING;
259259
}
260260

261+
static inline bool intel_uc_fw_is_in_error(struct intel_uc_fw *uc_fw)
262+
{
263+
return intel_uc_fw_status_to_error(__intel_uc_fw_status(uc_fw)) != 0;
264+
}
265+
261266
static inline bool intel_uc_fw_is_overridden(const struct intel_uc_fw *uc_fw)
262267
{
263268
return uc_fw->user_overridden;

0 commit comments

Comments
 (0)