summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/gt/uc/intel_gsc_uc.c2
-rw-r--r--sys/dev/pci/drm/i915/gt/uc/intel_uc_fw.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/gt/uc/intel_gsc_uc.c b/sys/dev/pci/drm/i915/gt/uc/intel_gsc_uc.c
index 0d3b22a7436..e251e061d1a 100644
--- a/sys/dev/pci/drm/i915/gt/uc/intel_gsc_uc.c
+++ b/sys/dev/pci/drm/i915/gt/uc/intel_gsc_uc.c
@@ -304,7 +304,7 @@ void intel_gsc_uc_load_start(struct intel_gsc_uc *gsc)
{
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))
diff --git a/sys/dev/pci/drm/i915/gt/uc/intel_uc_fw.h b/sys/dev/pci/drm/i915/gt/uc/intel_uc_fw.h
index 9a431726c8d..ac7b3aad222 100644
--- a/sys/dev/pci/drm/i915/gt/uc/intel_uc_fw.h
+++ b/sys/dev/pci/drm/i915/gt/uc/intel_uc_fw.h
@@ -258,6 +258,11 @@ static inline bool intel_uc_fw_is_running(struct intel_uc_fw *uc_fw)
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;