From: Greg Kroah-Hartman Date: Sun, 8 Sep 2024 12:38:59 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v4.19.322~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5bb9c13b0c925ff49fb918cc67c683f88358c28;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: drm-i915-do-not-attempt-to-load-the-gsc-multiple-times.patch --- diff --git a/queue-6.6/drm-i915-do-not-attempt-to-load-the-gsc-multiple-times.patch b/queue-6.6/drm-i915-do-not-attempt-to-load-the-gsc-multiple-times.patch new file mode 100644 index 00000000000..19de30ec46d --- /dev/null +++ b/queue-6.6/drm-i915-do-not-attempt-to-load-the-gsc-multiple-times.patch @@ -0,0 +1,63 @@ +From 59d3cfdd7f9655a0400ac453bf92199204f8b2a1 Mon Sep 17 00:00:00 2001 +From: Daniele Ceraolo Spurio +Date: Tue, 20 Aug 2024 14:59:52 -0700 +Subject: drm/i915: Do not attempt to load the GSC multiple times + +From: Daniele Ceraolo Spurio + +commit 59d3cfdd7f9655a0400ac453bf92199204f8b2a1 upstream. + +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: 15bd4a67e914 ("drm/i915/gsc: GSC firmware loading") +Signed-off-by: Daniele Ceraolo Spurio +Cc: Daniele Ceraolo Spurio +Cc: Alan Previn +Cc: John Harrison +Cc: Rodrigo Vivi +Cc: # v6.3+ +Reviewed-by: Jonathan Cavitt +Link: https://patchwork.freedesktop.org/patch/msgid/20240820215952.2290807-1-daniele.ceraolospurio@intel.com +(cherry picked from commit 03ded4d432a1fb7bb6c44c5856d14115f6f6c3b9) +Signed-off-by: Joonas Lahtinen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c | 2 +- + drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c ++++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c +@@ -304,7 +304,7 @@ void intel_gsc_uc_load_start(struct inte + { + struct intel_gt *gt = gsc_uc_to_gt(gsc); + +- if (!intel_uc_fw_is_loadable(&gsc->fw)) ++ if (!intel_uc_fw_is_loadable(&gsc->fw) || intel_uc_fw_is_in_error(&gsc->fw)) + return; + + if (intel_gsc_uc_fw_init_done(gsc)) +--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h ++++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +@@ -258,6 +258,11 @@ static inline bool intel_uc_fw_is_runnin + return __intel_uc_fw_status(uc_fw) == INTEL_UC_FIRMWARE_RUNNING; + } + ++static inline bool intel_uc_fw_is_in_error(struct intel_uc_fw *uc_fw) ++{ ++ return intel_uc_fw_status_to_error(__intel_uc_fw_status(uc_fw)) != 0; ++} ++ + static inline bool intel_uc_fw_is_overridden(const struct intel_uc_fw *uc_fw) + { + return uc_fw->user_overridden; diff --git a/queue-6.6/series b/queue-6.6/series index 4edde4ecc2a..3164e8c5dd8 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -57,3 +57,4 @@ sched-sch_cake-fix-bulk-flow-accounting-logic-for-host-fairness.patch nilfs2-fix-missing-cleanup-on-rollforward-recovery-error.patch nilfs2-protect-references-to-superblock-parameters-exposed-in-sysfs.patch nilfs2-fix-state-management-in-error-path-of-log-writing-function.patch +drm-i915-do-not-attempt-to-load-the-gsc-multiple-times.patch