drm/i915/uc: Skip reset preparation if GuC is already dead
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 22 May 2019 19:32:03 +0000 (19:32 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 May 2019 20:58:36 +0000 (21:58 +0100)
We may skip reset preparation steps if GuC is already sanitized.

v2: replace USES_GUC with guc_is_loaded

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-10-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/intel_uc.c

index f17cb3dad90bb27f6b281facb361f5facd1e7ad5..63fc12cbc25d06d577e5ca7bf6858230fd052d86 100644 (file)
@@ -493,7 +493,7 @@ void intel_uc_reset_prepare(struct drm_i915_private *i915)
 {
        struct intel_guc *guc = &i915->guc;
 
-       if (!USES_GUC(i915))
+       if (!intel_guc_is_loaded(guc))
                return;
 
        guc_stop_communication(guc);