aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-03-30 23:38:56 -0400
committerDave Airlie <airlied@redhat.com>2010-03-31 22:50:19 -0400
commit9e5786bd14cb9ffe29ebe66d41cedf03311b0d30 (patch)
tree18a1bec350a97117f4540e96323eb0efad3f9b36 /drivers
parentfb668c2fed628179c7aa409a0de39a2b96bed18c (diff)
drm/radeon/kms: add sanity check to wptr.
If we resume in a bad way, we'll get 0xffffffff in wptr, and then oops with no console. This just adds a sanity check so that we can avoid the oops and hopefully get more details out of people's systems. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/r100.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 138ddd49dfc5..c8f4b0300b70 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -744,6 +744,8 @@ int r100_cp_init(struct radeon_device *rdev, unsigned ring_size)
744 udelay(10); 744 udelay(10);
745 rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR); 745 rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR);
746 rdev->cp.wptr = RREG32(RADEON_CP_RB_WPTR); 746 rdev->cp.wptr = RREG32(RADEON_CP_RB_WPTR);
747 /* protect against crazy HW on resume */
748 rdev->cp.wptr &= rdev->cp.ptr_mask;
747 /* Set cp mode to bus mastering & enable cp*/ 749 /* Set cp mode to bus mastering & enable cp*/
748 WREG32(RADEON_CP_CSQ_MODE, 750 WREG32(RADEON_CP_CSQ_MODE,
749 REG_SET(RADEON_INDIRECT2_START, indirect2_start) | 751 REG_SET(RADEON_INDIRECT2_START, indirect2_start) |