diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-10-22 02:08:45 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-10-22 02:08:45 -0400 |
commit | 4cf06dfba617529291ce4b4c306c4fc1bba110ee (patch) | |
tree | f6b7b5c5396cd9cdb9dbd7fcefa71b64f0d75019 | |
parent | 66b194a78c470cb3978f310828dd96c3f3e96944 (diff) |
ATOM: use indirect addressing for regs >= 0x10000
-rw-r--r-- | src/radeon_atombios.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index 6db821f..a8eded6 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -30,6 +30,7 @@ #include "xf86_OSproc.h" #include "radeon.h" +#include "radeon_reg.h" #include "radeon_atombios.h" #include "radeon_atomwrapper.h" #include "radeon_probe.h" @@ -2646,9 +2647,16 @@ CailReadATIRegister(VOID* CAIL, UINT32 idx) RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); unsigned char *RADEONMMIO = pRADEONEnt->MMIO; UINT32 ret; + UINT32 mm_reg = idx << 2; CAILFUNC(CAIL); - ret = INREG(idx << 2); + if (mm_reg < 0x10000) + ret = INREG(mm_reg); + else { + OUTREG(RADEON_MM_INDEX, mm_reg); + ret = INREG(RADEON_MM_DATA); + } + /*DEBUGP(ErrorF("%s(%x) = %x\n",__func__,idx << 2,ret));*/ return ret; } @@ -2659,9 +2667,16 @@ CailWriteATIRegister(VOID *CAIL, UINT32 idx, UINT32 data) ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex]; RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); unsigned char *RADEONMMIO = pRADEONEnt->MMIO; + UINT32 mm_reg = idx << 2; CAILFUNC(CAIL); - OUTREG(idx << 2,data); + if (mm_reg < 0x10000) + OUTREG(mm_reg, data); + else { + OUTREG(RADEON_MM_INDEX, mm_reg); + OUTREG(RADEON_MM_DATA, data); + } + /*DEBUGP(ErrorF("%s(%x,%x)\n",__func__,idx << 2,data));*/ } |