xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Mon Jul 18 20:37:11 UTC 2016


 hw/xfree86/drivers/modesetting/driver.c |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 4b311d23e84356bd0e9e736aeed7448dd6382118
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Jul 18 12:46:51 2016 -0400

    modesetting: resubmit dirty rects on EINVAL (v2)
    
    This error code can mean we're submitting more rects at once than the
    driver can handle. If that happens, resubmit one at a time.
    
    v2: Make the rect submit loop more error-proof (Walter Harms)
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Michael Thayer <michael.thayer at oracle.com>

diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index f262082..5ebb394 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -515,6 +515,15 @@ dispatch_dirty_region(ScrnInfoPtr scrn,
 
         /* TODO query connector property to see if this is needed */
         ret = drmModeDirtyFB(ms->fd, fb_id, clip, num_cliprects);
+
+        /* if we're swamping it with work, try one at a time */
+        if (ret == -EINVAL) {
+            for (i = 0; i < num_cliprects; i++) {
+                if ((ret = drmModeDirtyFB(ms->fd, fb_id, &clip[i], 1)) < 0)
+                    break;
+            }
+        }
+
         free(clip);
         DamageEmpty(damage);
     }


More information about the xorg-commit mailing list