[PATCH xserver] modesetting: Fix page flipping under DRI 3.2.

Mario Kleiner mario.kleiner.de at gmail.com
Mon Mar 12 16:57:50 UTC 2018


The check for "no modifier specified" in drmmode_is_format_supported()
should check for DRM_FORMAT_MOD_INVALID, not for zero, as zero actually
means DRM_FORMAT_MOD_LINEAR.

This allows page-flipping again when appropriate, as
tested under nouveau and ati drivers.

Fixes: 9d147305b404 ("modesetting: Check if buffer format is supported when flipping")
Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 1027e63..b2af55f 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -94,7 +94,7 @@ drmmode_is_format_supported(ScrnInfoPtr scrn, uint32_t format, uint64_t modifier
             if (iter->format != format)
                 continue;
 
-            if (modifier == 0) {
+            if (modifier == DRM_FORMAT_MOD_INVALID) {
                 found = TRUE;
                 break;
             }
-- 
2.7.4



More information about the xorg-devel mailing list