diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2006-07-29 00:51:53 +0300 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2006-07-29 00:51:53 +0300 |
commit | 290c5aaa580428bc4748a47e4b9bcc22b90fc8d4 (patch) | |
tree | c733017ee29f14c452b7afb203459ea053340323 | |
parent | fba8c839b47e2c8d6a6d65950c3431ff5b870aa0 (diff) |
Bug #807: split out TestRegisterCaching block for DP regs.
-rw-r--r-- | src/atimach64accel.c | 78 |
1 files changed, 44 insertions, 34 deletions
diff --git a/src/atimach64accel.c b/src/atimach64accel.c index 1ecb13b..90fc28d 100644 --- a/src/atimach64accel.c +++ b/src/atimach64accel.c @@ -130,6 +130,8 @@ ATIMach64ValidateClip } } +static __inline__ void TestRegisterCachingDP(ScrnInfoPtr pScreenInfo); + /* * ATIMach64Sync -- * @@ -287,40 +289,7 @@ ATIMach64Sync * For debugging purposes, attempt to verify that each cached register * should actually be cached. */ - TestRegisterCaching(SRC_CNTL); - - TestRegisterCaching(HOST_CNTL); - - TestRegisterCaching(PAT_REG0); - TestRegisterCaching(PAT_REG1); - TestRegisterCaching(PAT_CNTL); - - if (RegisterIsCached(SC_LEFT_RIGHT) && /* Special case */ - (CacheSlot(SC_LEFT_RIGHT) != - (SetWord(inm(SC_RIGHT), 1) | SetWord(inm(SC_LEFT), 0)))) - { - UncacheRegister(SC_LEFT_RIGHT); - xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, - "SC_LEFT_RIGHT write cache disabled!\n"); - } - - if (RegisterIsCached(SC_TOP_BOTTOM) && /* Special case */ - (CacheSlot(SC_TOP_BOTTOM) != - (SetWord(inm(SC_BOTTOM), 1) | SetWord(inm(SC_TOP), 0)))) - { - UncacheRegister(SC_TOP_BOTTOM); - xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, - "SC_TOP_BOTTOM write cache disabled!\n"); - } - - TestRegisterCaching(DP_BKGD_CLR); - TestRegisterCaching(DP_FRGD_CLR); - TestRegisterCaching(DP_WRITE_MASK); - TestRegisterCaching(DP_MIX); - - TestRegisterCaching(CLR_CMP_CLR); - TestRegisterCaching(CLR_CMP_MSK); - TestRegisterCaching(CLR_CMP_CNTL); + TestRegisterCachingDP(pScreenInfo); if (pATI->Block1Base) { @@ -389,6 +358,47 @@ ATIMach64Sync pATI = *(volatile ATIPtr *)pATI->pMemory; } +static __inline__ void +TestRegisterCachingDP(ScrnInfoPtr pScreenInfo) +{ + ATIPtr pATI = ATIPTR(pScreenInfo); + + TestRegisterCaching(SRC_CNTL); + + TestRegisterCaching(HOST_CNTL); + + TestRegisterCaching(PAT_REG0); + TestRegisterCaching(PAT_REG1); + TestRegisterCaching(PAT_CNTL); + + if (RegisterIsCached(SC_LEFT_RIGHT) && /* Special case */ + (CacheSlot(SC_LEFT_RIGHT) != + (SetWord(inm(SC_RIGHT), 1) | SetWord(inm(SC_LEFT), 0)))) + { + UncacheRegister(SC_LEFT_RIGHT); + xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, + "SC_LEFT_RIGHT write cache disabled!\n"); + } + + if (RegisterIsCached(SC_TOP_BOTTOM) && /* Special case */ + (CacheSlot(SC_TOP_BOTTOM) != + (SetWord(inm(SC_BOTTOM), 1) | SetWord(inm(SC_TOP), 0)))) + { + UncacheRegister(SC_TOP_BOTTOM); + xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, + "SC_TOP_BOTTOM write cache disabled!\n"); + } + + TestRegisterCaching(DP_BKGD_CLR); + TestRegisterCaching(DP_FRGD_CLR); + TestRegisterCaching(DP_WRITE_MASK); + TestRegisterCaching(DP_MIX); + + TestRegisterCaching(CLR_CMP_CLR); + TestRegisterCaching(CLR_CMP_MSK); + TestRegisterCaching(CLR_CMP_CNTL); +} + /* * ATIMach64SetupForScreenToScreenCopy -- * |