st/xorg: Add a customizer option to get rid of annoying cursor update flicker

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
Thomas Hellstrom 2010-10-12 11:59:45 +02:00
parent f0bbf130f9
commit bfd065c71e
3 changed files with 12 additions and 1 deletions

View File

@ -234,6 +234,10 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
64, 64, (void*)image, 64 * 4, 0, 0);
ms->ctx->transfer_unmap(ms->ctx, transfer);
ms->ctx->transfer_destroy(ms->ctx, transfer);
if (crtc->cursor_shown)
drmModeSetCursor(ms->fd, crtcp->drm_crtc->crtc_id,
crtcp->cursor_handle, 64, 64);
}
#if HAVE_LIBKMS
@ -271,6 +275,10 @@ crtc_load_cursor_argb_kms(xf86CrtcPtr crtc, CARD32 * image)
memcpy(ptr, image, 64*64*4);
kms_bo_unmap(crtcp->cursor_bo);
if (crtc->cursor_shown)
drmModeSetCursor(ms->fd, crtcp->drm_crtc->crtc_id,
crtcp->cursor_handle, 64, 64);
return;
err_bo_destroy:

View File

@ -791,7 +791,9 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (!ms->SWCursor)
xf86_cursors_init(pScreen, 64, 64,
HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 |
HARDWARE_CURSOR_ARGB);
HARDWARE_CURSOR_ARGB |
((cust && cust->unhidden_hw_cursor_update) ?
HARDWARE_CURSOR_UPDATE_UNHIDDEN : 0));
/* Must force it before EnterVT, so we are in control of VT and
* later memory should be bound when allocating, e.g rotate_mem */

View File

@ -76,6 +76,7 @@ typedef struct _CustomizerRec
Bool dirty_throttling;
Bool swap_throttling;
Bool no_3d;
Bool unhidden_hw_cursor_update;
Bool (*winsys_pre_init) (struct _CustomizerRec *cust, int fd);
Bool (*winsys_screen_init)(struct _CustomizerRec *cust);
Bool (*winsys_screen_close)(struct _CustomizerRec *cust);