[PATCH] modesetting: Update the cursor without hiding it

Keith Packard keithp at keithp.com
Thu Jan 8 14:47:32 PST 2015


"Jasper St. Pierre" <jstpierre at mecheye.net> writes:

> 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.

It's "safer" to not hit the cursor memory while it's being used, if
you're writing that directly. Presumably any kernel driver behind KMS
will solve this itself though.

> 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);

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150108/f8178ca5/attachment-0001.sig>


More information about the xorg-devel mailing list