On 3/21/19 10:14 AM, Sujaritha Sundaresan wrote:
Adding a call to intel_uc_suspend in i915_gem_suspend, which
is a common point for the suspend/resume and hibernate paths.
This fixes an unbalanced call that causes issues with the CTB
register/deregister.

Cc: Daniele Ceraolo Spurio <daniele.ceraolospu...@intel.com>
Cc: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdec...@intel.com>
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundare...@intel.com>
---
  drivers/gpu/drm/i915/i915_gem.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1a684b7e8c09..980855ebdeda 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4371,6 +4371,9 @@ void i915_gem_suspend(struct drm_i915_private *i915)
         */
        switch_to_kernel_context_sync(i915, i915->gt.active_engines);
+ if (!__i915_wedged(&i915->gpu_error))
+               intel_uc_suspend(i915);

We can probably call intel_uc_suspend unconditionally, because it internally checks for INTEL_UC_FIRMWARE_SUCCESS, which should be false if we wedged due to the uc_reset_prepare we added to the wedge function.

Daniele

+
        mutex_unlock(&i915->drm.struct_mutex);
        i915_reset_flush(i915);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to