summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2005-03-29 06:14:34 +0000
committerMichel Daenzer <michel@daenzer.net>2005-03-29 06:14:34 +0000
commit1f516747384809400738801762845a83d9ae47bc (patch)
tree374f8a22cf0f39745f71255dc3d493cd9a884c5f
parentbcbadb9c8be3b5a976b19718a98f41259edf4f9b (diff)
bugzilla #2844 (https://bugs.freedesktop.org/show_bug.cgi?id=2844)
attachment #2230 (http://bugs.freedesktop.org/attachment.cgi?id=2230) Wait for idle before uploading HW cursor data to the framebuffer to avoid lockups when moving the mouse on some machines.
-rw-r--r--src/radeon_cursor.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 102d3b0..4832399 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -64,6 +64,10 @@ static CARD32 mono_cursor_color[] = {
#define CURSOR_WIDTH 64
#define CURSOR_HEIGHT 64
+#define COMMON_CURSOR_SWAPPING_START() \
+ if (info->accel && info->accel->Sync) \
+ info->accel->Sync(pScrn);
+
/*
* The cursor bits are always 32bpp. On MSBFirst buses,
* configure byte swapping to swap 32 bit units when writing
@@ -74,17 +78,23 @@ static CARD32 mono_cursor_color[] = {
#define CURSOR_SWAPPING_DECL_MMIO unsigned char *RADEONMMIO = info->MMIO;
#define CURSOR_SWAPPING_START() \
+ do { \
OUTREG(RADEON_SURFACE_CNTL, \
(info->ModeReg.surface_cntl | \
RADEON_NONSURF_AP0_SWP_32BPP) & \
- ~RADEON_NONSURF_AP0_SWP_16BPP)
+ ~RADEON_NONSURF_AP0_SWP_16BPP); \
+ COMMON_CURSOR_SWAPPING_START(); \
+ } while (0)
#define CURSOR_SWAPPING_END() (OUTREG(RADEON_SURFACE_CNTL, \
info->ModeReg.surface_cntl))
#else
#define CURSOR_SWAPPING_DECL_MMIO
-#define CURSOR_SWAPPING_START()
+#define CURSOR_SWAPPING_START() \
+ do { \
+ COMMON_CURSOR_SWAPPING_START(); \
+ } while (0)
#define CURSOR_SWAPPING_END()
#endif