[Intel-gfx] [PATCH 1/7] drm/i915/uc: Use GuC firmware status helper
Michal Wajdeczko
michal.wajdeczko at intel.com
Fri May 17 16:22:21 UTC 2019
We already have helper function for checking GuC firmware
load status. Replace existing open-coded checks.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_uc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 1ee70df51627..f67f6224b1df 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -486,7 +486,7 @@ void intel_uc_runtime_suspend(struct drm_i915_private *i915)
struct intel_guc *guc = &i915->guc;
int err;
- if (guc->fw.load_status != INTEL_UC_FIRMWARE_SUCCESS)
+ if (!intel_guc_is_alive(guc))
return;
err = intel_guc_suspend(guc);
@@ -501,7 +501,7 @@ void intel_uc_suspend(struct drm_i915_private *i915)
struct intel_guc *guc = &i915->guc;
intel_wakeref_t wakeref;
- if (guc->fw.load_status != INTEL_UC_FIRMWARE_SUCCESS)
+ if (!intel_guc_is_alive(guc))
return;
with_intel_runtime_pm(i915, wakeref)
@@ -516,7 +516,7 @@ int intel_uc_resume(struct drm_i915_private *i915)
if (!USES_GUC(i915))
return 0;
- if (guc->fw.load_status != INTEL_UC_FIRMWARE_SUCCESS)
+ if (!intel_guc_is_alive(guc))
return 0;
guc_enable_communication(guc);
--
2.19.2
More information about the Intel-gfx
mailing list