Gitweb: http://git.kernel.org/linus/9e5786bd14cb9ffe29ebe66d41cedf03311b0d30 Commit: 9e5786bd14cb9ffe29ebe66d41cedf03311b0d30 Parent: fb668c2fed628179c7aa409a0de39a2b96bed18c Author: Dave Airlie <airlied@redhat.com> AuthorDate: Wed Mar 31 13:38:56 2010 +1000 Committer: Dave Airlie <airlied@redhat.com> CommitDate: Thu Apr 1 12:50:19 2010 +1000 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> --- drivers/gpu/drm/radeon/r100.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 138ddd4..c8f4b03 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) udelay(10); rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR); rdev->cp.wptr = RREG32(RADEON_CP_RB_WPTR); + /* protect against crazy HW on resume */ + rdev->cp.wptr &= rdev->cp.ptr_mask; /* Set cp mode to bus mastering & enable cp*/ WREG32(RADEON_CP_CSQ_MODE, REG_SET(RADEON_INDIRECT2_START, indirect2_start) | -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
