[PATCH 4/7] drm/i915: only disable outputs in simulated gpu resets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For the old chips where the reset also kills the display we don't need
to do this, it all goes down on its own. We only need to do this for
gpu resets where the interaction with the display side is simulated.

This means we're not 100% faithful with what we test, but there's a
big pile of other small differences (like having to restore interrupts
and hpd handling and everything else).

Doing that means we don't have a full commit to synchronize with all
outstanding changes, so use the new helper to do that instead.

Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_display.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e3c55a996f6b..b0de36f11f6d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3484,6 +3484,8 @@ void intel_prepare_reset(struct drm_i915_private *dev_priv)
 
 		drm_modeset_backoff(ctx);
 	}
+	drm_atomic_helper_sync_all(dev);
+
 	/*
 	 * Disabling the crtcs gracefully seems nicer. Also the
 	 * g33 docs say we should at least disable all the planes.
@@ -3495,11 +3497,15 @@ void intel_prepare_reset(struct drm_i915_private *dev_priv)
 		return;
 	}
 
-	ret = drm_atomic_helper_disable_all(dev, ctx);
-	if (ret) {
-		DRM_ERROR("Suspending crtc's failed with %i\n", ret);
-		drm_atomic_state_put(state);
-		return;
+	/* only when we test this through force_reset_modeset_test shut down the
+	 * entire display manually. For hw where gpu reset kills the display
+	 * this happens automatically. This avoids unecessary trouble with
+	 * double-commit.
+	 */
+	if (!gpu_reset_clobbers_display(dev_priv)) {
+		ret = drm_atomic_helper_disable_all(dev, ctx);
+		if (ret)
+			DRM_ERROR("Suspending crtc's failed with %i\n", ret);
 	}
 
 	dev_priv->modeset_restore_state = state;
-- 
2.13.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux