[Mesa-dev] [PATCH] st/xorg: flush after loading the cursor

Marcin Slusarz marcin.slusarz at gmail.com
Sun May 1 15:01:34 PDT 2011


We need cursor data to land in destination buffer before drmModeSetCursor.
It fixes "cursor lag" at least on nv50.
---
 src/gallium/state_trackers/xorg/xorg_crtc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index b8d9474..e8ca631 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -247,6 +247,7 @@ 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);
+    ms->ctx->flush(ms->ctx, NULL);
 
     if (crtc->cursor_shown)
 	drmModeSetCursor(ms->fd, crtcp->drm_crtc->crtc_id,
-- 
1.7.4.1



More information about the mesa-dev mailing list