diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-09-08 00:22:40 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-09-08 00:22:40 +0200 |
commit | 0241cac643fa1c08a45ea44f5c670b290e760ad8 (patch) | |
tree | cd36d2d30a7266e8dde59cb0c863c099c4a449b9 /src/radeon_cursor.c | |
parent | 49933e2f7d590811f2bc8c0d51a09f3b7f14845e (diff) |
radeon: Reinstate sync in radeon_crtc_show/hide_cursor.
Make sure the DRI lock is held though, as these can be called asynchronously.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12245 .
Diffstat (limited to 'src/radeon_cursor.c')
-rw-r--r-- | src/radeon_cursor.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c index f19f2bc0..3e60d231 100644 --- a/src/radeon_cursor.c +++ b/src/radeon_cursor.c @@ -98,12 +98,22 @@ radeon_crtc_show_cursor (xf86CrtcPtr crtc) RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; +#ifdef XF86DRI + if (info->CPStarted && pScrn->pScreen) DRILock(pScrn->pScreen, 0); +#endif + + RADEON_SYNC(info, pScrn); + if (crtc_id == 0) OUTREGP(RADEON_CRTC_GEN_CNTL, RADEON_CRTC_CUR_EN | 2 << 20, ~(RADEON_CRTC_CUR_EN | RADEON_CRTC_CUR_MODE_MASK)); else if (crtc_id == 1) OUTREGP(RADEON_CRTC2_GEN_CNTL, RADEON_CRTC2_CUR_EN | 2 << 20, ~(RADEON_CRTC2_CUR_EN | RADEON_CRTC2_CUR_MODE_MASK)); + +#ifdef XF86DRI + if (info->CPStarted && pScrn->pScreen) DRIUnlock(pScrn->pScreen); +#endif } void @@ -115,12 +125,20 @@ radeon_crtc_hide_cursor (xf86CrtcPtr crtc) RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; +#ifdef XF86DRI + if (info->CPStarted && pScrn->pScreen) DRILock(pScrn->pScreen, 0); +#endif + + RADEON_SYNC(info, pScrn); + if (crtc_id == 0) OUTREGP(RADEON_CRTC_GEN_CNTL, 0, ~RADEON_CRTC_CUR_EN); else if (crtc_id == 1) OUTREGP(RADEON_CRTC2_GEN_CNTL, 0, ~RADEON_CRTC2_CUR_EN); - +#ifdef XF86DRI + if (info->CPStarted && pScrn->pScreen) DRIUnlock(pScrn->pScreen); +#endif } void |