diff options
author | Dave Airlie <airlied@redhat.com> | 2008-11-03 09:28:56 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-11-03 09:28:56 +1000 |
commit | a066a5f908af0e82b1a0c7099b73d4a63585c69d (patch) | |
tree | d0ad9eb0802f2bc106ed94a99c31771a9d164b75 | |
parent | 0dbe3436ee6e3f2a4d6d252ef5e31b7bb7e36764 (diff) |
radeon: make writeback work again
-rw-r--r-- | shared-core/radeon_cp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index f579e01a..0200797a 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -825,7 +825,7 @@ static void radeon_cp_init_ring_buffer(struct drm_device * dev, static void radeon_test_writeback(drm_radeon_private_t * dev_priv) { - u32 tmp; + u32 tmp, scratch1_store; void *ring_read_ptr; if (dev_priv->mm.ring_read.bo) @@ -833,6 +833,7 @@ static void radeon_test_writeback(drm_radeon_private_t * dev_priv) else ring_read_ptr = dev_priv->ring_rptr->handle; + scratch1_store = RADEON_READ(RADEON_SCRATCH_REG1); /* Writeback doesn't seem to work everywhere, test it here and possibly * enable it if it appears to work */ @@ -858,6 +859,9 @@ static void radeon_test_writeback(drm_radeon_private_t * dev_priv) DRM_INFO("writeback forced off\n"); } + /* write back previous value */ + RADEON_WRITE(RADEON_SCRATCH_REG1, scratch1_store); + if (!dev_priv->writeback_works) { /* Disable writeback to avoid unnecessary bus master transfers */ RADEON_WRITE(RADEON_CP_RB_CNTL, RADEON_READ(RADEON_CP_RB_CNTL) | RADEON_RB_NO_UPDATE); @@ -2353,6 +2357,8 @@ int radeon_modeset_cp_resume(struct drm_device *dev) radeon_do_engine_reset(dev); + radeon_test_writeback(dev_priv); + radeon_do_cp_start(dev_priv); return 0; } |