All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/gt: Allow clobbering gpu resets if the display is off
@ 2019-09-09 22:55 Chris Wilson
  2019-09-09 22:55 ` [PATCH 2/2] drm/i915/gt: Only unwedge if we can reset first Chris Wilson
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Chris Wilson @ 2019-09-09 22:55 UTC (permalink / raw)
  To: intel-gfx

If the display is inactive, we need not worry about the gpu reset
clobbering the display!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index b9d84d52e986..fe57296b790c 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -7,6 +7,7 @@
 #include <linux/sched/mm.h>
 #include <linux/stop_machine.h>
 
+#include "display/intel_display.h"
 #include "display/intel_display_types.h"
 #include "display/intel_overlay.h"
 
@@ -729,6 +730,21 @@ static void nop_submit_request(struct i915_request *request)
 	intel_engine_queue_breadcrumbs(engine);
 }
 
+static bool reset_clobbers_display(struct drm_i915_private *i915)
+{
+	struct intel_crtc *crtc;
+
+	if (!INTEL_INFO(i915)->gpu_reset_clobbers_display)
+		return false;
+
+	for_each_intel_crtc(&i915->drm, crtc) {
+		if (crtc->active)
+			return true;
+	}
+
+	return false;
+}
+
 static void __intel_gt_set_wedged(struct intel_gt *gt)
 {
 	struct intel_engine_cs *engine;
@@ -755,7 +771,7 @@ static void __intel_gt_set_wedged(struct intel_gt *gt)
 	awake = reset_prepare(gt);
 
 	/* Even if the GPU reset fails, it should still stop the engines */
-	if (!INTEL_INFO(gt->i915)->gpu_reset_clobbers_display)
+	if (!reset_clobbers_display(gt->i915))
 		__intel_gt_reset(gt, ALL_ENGINES);
 
 	for_each_engine(engine, gt->i915, id)
-- 
2.23.0

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-09-13  7:43 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09 22:55 [PATCH 1/2] drm/i915/gt: Allow clobbering gpu resets if the display is off Chris Wilson
2019-09-09 22:55 ` [PATCH 2/2] drm/i915/gt: Only unwedge if we can reset first Chris Wilson
2019-09-10  0:59   ` Daniele Ceraolo Spurio
2019-09-10  6:06     ` Chris Wilson
2019-09-10 21:20       ` Daniele Ceraolo Spurio
2019-09-10  7:39   ` Janusz Krzysztofik
2019-09-13  7:41     ` Chris Wilson
2019-09-09 23:33 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/gt: Allow clobbering gpu resets if the display is off Patchwork
2019-09-10  7:39 ` [PATCH 1/2] " Ville Syrjälä
2019-09-10  8:32   ` Chris Wilson
2019-09-10  8:58     ` Ville Syrjälä
2019-09-11 10:01       ` Chris Wilson
2019-09-11 10:19   ` [PATCH v2] " Chris Wilson
2019-09-11 10:48     ` Chris Wilson
2019-09-11 10:52     ` Ville Syrjälä
2019-09-11 11:02       ` Chris Wilson
2019-09-11 10:58 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2] drm/i915/gt: Allow clobbering gpu resets if the display is off (rev2) Patchwork
2019-09-11 11:35 ` ✗ Fi.CI.BAT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.