When submitting dirty rectangles to the kernel driver, modesetting checks
the return value, and if it gets ENOSYS (driver does not support reporting)
or EINVAL (invalid data submitted to the kernel driver) it disables reporting
for the rest of the session.  The second is clearly wrong, and has been seen
to trigger in practice when the X server submits more rectangles at once to
the VirtualBox kernel driver than the kernel will accept.  I would expect
this too affect most or all other drivers for virtual graphics devices and
some others.

Signed-off-by: Michael Thayer <[email protected]>
---
 hw/xfree86/drivers/modesetting/driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/driver.c 
b/hw/xfree86/drivers/modesetting/driver.c
index 256ca95..81c9b4c 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -517,7 +517,7 @@ dispatch_dirty(ScreenPtr pScreen)
     int ret;
 
     ret = dispatch_dirty_region(scrn, pixmap, ms->damage, fb_id);
-    if (ret == -EINVAL || ret == -ENOSYS) {
+    if (ret == -ENOSYS) {
         ms->dirty_enabled = FALSE;
         DamageUnregister(ms->damage);
         DamageDestroy(ms->damage);
-- 
2.7.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to