Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Fix intel pipe update lo...



details:   https://anonhg.NetBSD.org/src/rev/36d475f404ef
branches:  trunk
changeset: 992997:36d475f404ef
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:43:00 2018 +0000

description:
Fix intel pipe update locking and whining.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 61e187379cb3 -r 36d475f404ef sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c        Mon Aug 27 14:42:43 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c        Mon Aug 27 14:43:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_sprite.c,v 1.7 2018/08/27 07:28:26 riastradh Exp $       */
+/*     $NetBSD: intel_sprite.c,v 1.8 2018/08/27 14:43:00 riastradh Exp $       */
 
 /*
  * Copyright © 2011 Intel Corporation
@@ -32,7 +32,7 @@
  * support.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.7 2018/08/27 07:28:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.8 2018/08/27 14:43:00 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
@@ -115,7 +115,7 @@
        if (min <= 0 || max <= 0)
                return;
 
-       if (WARN_ON(drm_crtc_vblank_get(&crtc->base)))
+       if (WARN_ON(drm_crtc_vblank_get_locked(&crtc->base)))
                return;
 
        crtc->debug.min_vbl = min;
@@ -126,9 +126,10 @@
        DRM_SPIN_TIMED_WAIT_UNTIL(ret, wq, &dev->vbl_lock, timeout,
            (scanline = intel_get_crtc_scanline(crtc),
                scanline < min || scanline > max));
-       if (ret)
-               DRM_ERROR("Potential atomic update failure on pipe %c\n",
-                   pipe_name(crtc->pipe));
+       if (ret <= 0)
+               DRM_ERROR("Potential atomic update failure on pipe %c: %d\n",
+                   pipe_name(crtc->pipe), ret ? ret : -EWOULDBLOCK);
+       drm_crtc_vblank_put_locked(&crtc->base);
 #else
        for (;;) {
                /*
@@ -156,9 +157,9 @@
        }
 
        finish_wait(wq, &wait);
-#endif
 
        drm_crtc_vblank_put(&crtc->base);
+#endif
 
        crtc->debug.scanline_start = scanline;
        crtc->debug.start_vbl_time = ktime_get();



Home | Main Index | Thread Index | Old Index