diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-09-12 23:26:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-09-12 23:26:27 +0000 |
commit | e61606288e8309ee325d80fe7c7219eb11d7b34a (patch) | |
tree | 78270411993bbc9ef34d3a5e9d41ce187e048555 /sys | |
parent | f00e7dc2a9d9a8e7de9fca396e1b6901d5b8d95b (diff) |
drm/i915: Do not attempt to load the GSC multiple times
From Daniele Ceraolo Spurio
337266ada863a4232c9f8634deedc298a145521c in linux-6.6.y/6.6.51
59d3cfdd7f9655a0400ac453bf92199204f8b2a1 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/i915/gt/uc/intel_gsc_uc.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/gt/uc/intel_uc_fw.h | 5 |
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; |