intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Handle error paths during watermark sanitization properly
@ 2016-01-11 16:16 Matt Roper
  2016-01-11 16:49 ` ✗ warning: Fi.CI.BAT Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Matt Roper @ 2016-01-11 16:16 UTC (permalink / raw)
  To: intel-gfx

sanitize_watermarks() does not properly handle errors returned by
drm_atomic_helper_duplicate_state().  EDEADLK should trigger a modeset
backoff and retry; for other errors we need to drop locks before
returning.

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
I think this might fix the problems that blew up the CI system recently.

 drivers/gpu/drm/i915/intel_display.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 391cc7f..fdff460 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15316,8 +15316,13 @@ retry:
 	}
 
 	state = drm_atomic_helper_duplicate_state(dev, &ctx);
-	if (WARN_ON(IS_ERR(state)))
-		return;
+	ret = PTR_ERR_OR_ZERO(state);
+	if (ret == -EDEADLK) {
+		drm_modeset_backoff(&ctx);
+		goto retry;
+	} else if (WARN_ON(ret)) {
+		goto fail;
+	}
 
 	ret = intel_atomic_check(dev, state);
 	if (ret) {
@@ -15345,6 +15350,7 @@ retry:
 	}
 
 	drm_atomic_state_free(state);
+fail:
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);
 }
-- 
2.1.4

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

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

end of thread, other threads:[~2016-01-12 15:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11 16:16 [PATCH] drm/i915: Handle error paths during watermark sanitization properly Matt Roper
2016-01-11 16:49 ` ✗ warning: Fi.CI.BAT Patchwork
2016-01-11 18:27 ` [PATCH] drm/i915: Handle error paths during watermark sanitization properly (v2) Matt Roper
2016-01-12  7:52   ` Maarten Lankhorst
2016-01-12 15:13     ` [PATCH] drm/i915: Handle error paths during watermark sanitization properly (v3) Matt Roper
2016-01-12  7:20 ` ✗ warning: Fi.CI.BAT Patchwork
2016-01-12 15:49 ` Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).