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>
This commit is contained in:
committed by
Dave Airlie
parent
296c6ae0e9
commit
b07fa022ec
@@ -3010,14 +3010,14 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
|
||||
break;
|
||||
case RADEON_PARAM_LAST_FRAME:
|
||||
dev_priv->stats.last_frame_reads++;
|
||||
value = GET_SCRATCH(0);
|
||||
value = GET_SCRATCH(dev_priv, 0);
|
||||
break;
|
||||
case RADEON_PARAM_LAST_DISPATCH:
|
||||
value = GET_SCRATCH(1);
|
||||
value = GET_SCRATCH(dev_priv, 1);
|
||||
break;
|
||||
case RADEON_PARAM_LAST_CLEAR:
|
||||
dev_priv->stats.last_clear_reads++;
|
||||
value = GET_SCRATCH(2);
|
||||
value = GET_SCRATCH(dev_priv, 2);
|
||||
break;
|
||||
case RADEON_PARAM_IRQ_NR:
|
||||
value = drm_dev_to_irq(dev);
|
||||
|
Reference in New Issue
Block a user