xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Fri Jan 9 17:50:16 PST 2015


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

New commits:
commit 4e12d7b6f4489fa06475465993a3e1e1d896390b
Author: Jasper St. Pierre <jstpierre at mecheye.net>
Date:   Sun Jan 4 23:27:32 2015 -0800

    modesetting: Update the cursor without hiding it
    
    In the new KMS APIs, the legacy drmModeSetCursor ioctl actually waits
    for a vblank after changing the cursor image before returning, meaning
    that the X server, in attempting to hide the cursor before updating
    its image, actually makes that hide *visible* for a full vblank.
    
    It's unknown why the X server does this by default, but turn it off.
    
    If we're with a legacy driver that doesn't support the modern
    drmModeSetCursor by waiting for a vblank before returning, we're going
    to get a tiny bit of tearing on the cursor plane. But between tearing
    with a new cursor image and tearing with a blank cursor image, I'd
    rather the former.
    
    The only proper solution to this is an atomic ioctl that page flips
    all planes, including the cursor plane, at vblank time and at the same
    time.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 1ebf807..1cb0c7c 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -1077,6 +1077,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
     if (!ms->drmmode.sw_cursor)
         xf86_cursors_init(pScreen, ms->cursor_width, ms->cursor_height,
                           HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 |
+                          HARDWARE_CURSOR_UPDATE_UNHIDDEN |
                           HARDWARE_CURSOR_ARGB);
 
     /* Must force it before EnterVT, so we are in control of VT and


More information about the xorg-commit mailing list