diff options
author | Dave Airlie <airlied@redhat.com> | 2007-11-20 08:04:32 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2007-11-20 08:04:32 +1000 |
commit | fe2f7a09050fb7a345a1f52239f8f3c4f1053891 (patch) | |
tree | ee75ebf7f5bfda3a6d621ac42121a3014d80e0aa /src/radeon_cursor.c | |
parent | 744c8cb6c293fcaa687566f52901644e699baace (diff) | |
parent | 49055d8aff91ff12186feaf5343c8fd2f96bcba0 (diff) |
Merge branch 'master' into agd-atom-merge
Conflicts:
src/radeon_cursor.c
src/radeon_output.c
Diffstat (limited to 'src/radeon_cursor.c')
-rw-r--r-- | src/radeon_cursor.c | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c index bf66516b..8cef5d63 100644 --- a/src/radeon_cursor.c +++ b/src/radeon_cursor.c @@ -117,29 +117,26 @@ 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 (IS_AVIVO_VARIANT) { OUTREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset, INREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset) | AVIVO_D1CURSOR_EN); avivo_setup_cursor(crtc, TRUE); } else { - 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)); + switch (crtc_id) { + case 0: + OUTREG(RADEON_MM_INDEX, RADEON_CRTC_GEN_CNTL); + break; + case 1: + OUTREG(RADEON_MM_INDEX, RADEON_CRTC2_GEN_CNTL); + break; + default: + return; + } + + OUTREGP(RADEON_MM_DATA, RADEON_CRTC_CUR_EN | 2 << 20, + ~(RADEON_CRTC_CUR_EN | RADEON_CRTC_CUR_MODE_MASK)); } - -#ifdef XF86DRI - if (info->CPStarted && pScrn->pScreen) DRIUnlock(pScrn->pScreen); -#endif } void @@ -151,27 +148,24 @@ 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 (IS_AVIVO_VARIANT) { OUTREG(AVIVO_D1CUR_CONTROL+ radeon_crtc->crtc_offset, INREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset) & ~(AVIVO_D1CURSOR_EN)); avivo_setup_cursor(crtc, FALSE); } else { - 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 + case 0: + OUTREG(RADEON_MM_INDEX, RADEON_CRTC_GEN_CNTL); + break; + case 1: + OUTREG(RADEON_MM_INDEX, RADEON_CRTC2_GEN_CNTL); + break; + default: + return; + } + + OUTREGP(RADEON_MM_DATA, 0, ~RADEON_CRTC_CUR_EN); + } } void |