[PATCH v5 06/13] modesetting: Always load ms->drmmode.pageflip

Alex Goins agoins at nvidia.com
Wed Apr 13 04:17:53 UTC 2016


ms->drmmode.pageflip was only loaded from options if ms->drmmode.glamor was
defined, otherwise it would always assume FALSE.

PRIME Synchronization requires ms->drmmode.pageflip even if we aren't using
glamor, so load it unconditionally.

v1: N/A
v2: N/A
v3: N/A
v4: N/A
v5: Initial commit

Signed-off-by: Alex Goins <agoins at nvidia.com>
---
 hw/xfree86/drivers/modesetting/driver.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index eb5084f..5edfd9b 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -874,10 +874,7 @@ PreInit(ScrnInfoPtr pScrn, int flags)
 
     try_enable_glamor(pScrn);
 
-    if (ms->drmmode.glamor) {
-        ms->drmmode.pageflip =
-            xf86ReturnOptValBool(ms->drmmode.Options, OPTION_PAGEFLIP, TRUE);
-    } else {
+    if (!ms->drmmode.glamor) {
         Bool prefer_shadow = TRUE;
 
         ret = drmGetCap(ms->fd, DRM_CAP_DUMB_PREFER_SHADOW, &value);
@@ -893,10 +890,11 @@ PreInit(ScrnInfoPtr pScrn, int flags)
                    "ShadowFB: preferred %s, enabled %s\n",
                    prefer_shadow ? "YES" : "NO",
                    ms->drmmode.shadow_enable ? "YES" : "NO");
-
-        ms->drmmode.pageflip = FALSE;
     }
 
+    ms->drmmode.pageflip =
+        xf86ReturnOptValBool(ms->drmmode.Options, OPTION_PAGEFLIP, TRUE);
+
     if (drmmode_pre_init(pScrn, &ms->drmmode, pScrn->bitsPerPixel / 8) == FALSE) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "KMS setup failed\n");
         goto fail;
-- 
1.9.1



More information about the xorg-devel mailing list