diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-02-19 10:20:28 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-02-19 10:20:28 -0500 |
commit | 42492c70c481c88911337eefb97ba9d030adf7b6 (patch) | |
tree | 500325fe63f2f9e713a933a7f703eb560105e670 | |
parent | 61311b1de019c5a2344928a47347a966c229b08a (diff) |
R6xx/R7xx: wait for MC idle when changing the MC
should fix bug 19984
-rw-r--r-- | src/radeon_driver.c | 7 | ||||
-rw-r--r-- | src/radeon_reg.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 32cb307e..74245777 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -635,10 +635,13 @@ void RADEONOUTMC(ScrnInfoPtr pScrn, int addr, uint32_t data) static Bool avivo_get_mc_idle(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; if (info->ChipFamily >= CHIP_FAMILY_R600) { - /* no idea where this is on r600 yet */ - return TRUE; + if (INREG(R600_SRBM_STATUS) & 0x3f00) + return FALSE; + else + return TRUE; } else if (info->ChipFamily == CHIP_FAMILY_RV515) { if (INMC(pScrn, RV515_MC_STATUS) & RV515_MC_STATUS_IDLE) return TRUE; diff --git a/src/radeon_reg.h b/src/radeon_reg.h index 7b8840bf..c4177cca 100644 --- a/src/radeon_reg.h +++ b/src/radeon_reg.h @@ -3482,6 +3482,8 @@ # define R600_CHANSIZE (1 << 7) # define R600_CHANSIZE_OVERRIDE (1 << 10) +#define R600_SRBM_STATUS 0x0e50 + #define AVIVO_HDP_FB_LOCATION 0x134 #define AVIVO_VGA_RENDER_CONTROL 0x0300 |