drm: radeon: Fix ring_rptr accesses.
authorDavid Miller <davem@davemloft.net>
Thu, 12 Feb 2009 10:15:37 +0000 (02:15 -0800)
committerDave Airlie <airlied@redhat.com>
Fri, 13 Mar 2009 04:24:00 +0000 (14:24 +1000)
commitb07fa022ecf1e04fd0623877affe9e10bf45ac86
tree59d17e4b898db739701552030519ca7e0004ab6c
parent296c6ae0e9b5ced1060b43a68b5f7e41a18509f6
drm: radeon: Fix ring_rptr accesses.

The memory behind ring_rptr can either be in ioremapped memory
or a vmalloc() normal kernel memory buffer.

However, the code unconditionally uses DRM_{READ,WRITE}32() (and thus
readl() and writel()) to access it.

Basically, if RADEON_IS_AGP then it's ioremap()'d memory else it's
vmalloc'd memory.

Adjust all of the ring_rptr access code as needed.

While we're here, kill the 'scratch' pointer in drm_radeon_private.
It's only used in the one place where it is initialized.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/radeon/radeon_cp.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_state.c