diff mbox series

[3/7] drm/i915/uc: Skip GuC HW unwinding if GuC is already dead

Message ID 20190517162227.6436-4-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show
Series GuC fixes | expand

Commit Message

Michal Wajdeczko May 17, 2019, 4:22 p.m. UTC
We should not attempt to unwind GuC hardware/firmware setup
if we already have sanitized GuC.

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>
---
 drivers/gpu/drm/i915/intel_uc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Chris Wilson May 17, 2019, 6:19 p.m. UTC | #1
Quoting Michal Wajdeczko (2019-05-17 17:22:23)
> We should not attempt to unwind GuC hardware/firmware setup
> if we already have sanitized GuC.
> 
> 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>
> ---
>  drivers/gpu/drm/i915/intel_uc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 01683d107348..9d86cd831ea7 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -465,6 +465,9 @@ void intel_uc_fini_hw(struct drm_i915_private *i915)
>  
>         GEM_BUG_ON(!HAS_GUC(i915));
>  
> +       if (!intel_guc_is_alive(guc))
> +               return;
> +

Something else along these lines would be avoiding

https://bugs.freedesktop.org/show_bug.cgi?id=110622

I presume you can think of something a bit more precise to skip guc
selftests if guc initialisation failed.
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 01683d107348..9d86cd831ea7 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -465,6 +465,9 @@  void intel_uc_fini_hw(struct drm_i915_private *i915)
 
 	GEM_BUG_ON(!HAS_GUC(i915));
 
+	if (!intel_guc_is_alive(guc))
+		return;
+
 	if (USES_GUC_SUBMISSION(i915))
 		intel_guc_submission_disable(guc);