aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-08-07 06:33:57 -0400
committerDave Airlie <airlied@linux.ie>2006-09-21 15:32:30 -0400
commit8624ecbf68e90e5a8124514a0b7f92767fb80a62 (patch)
treeb0de0beb4e43e567f6e09a4dae08a9fb0ad494ec /drivers/char
parent9ca941615ee6418cd38c13602960f29c7ac7d973 (diff)
drm: radeon: implement RADEON_PARAM_SCRATCH_OFFSET getparam
When this succeeds, userspace can read the scratch register contents from th mapped writeback page directly. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/drm/radeon_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c
index 99589fe0032f..0433ff80cb70 100644
--- a/drivers/char/drm/radeon_state.c
+++ b/drivers/char/drm/radeon_state.c
@@ -2987,7 +2987,11 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS)
2987 case RADEON_PARAM_GART_TEX_HANDLE: 2987 case RADEON_PARAM_GART_TEX_HANDLE:
2988 value = dev_priv->gart_textures_offset; 2988 value = dev_priv->gart_textures_offset;
2989 break; 2989 break;
2990 2990 case RADEON_PARAM_SCRATCH_OFFSET:
2991 if (!dev_priv->writeback_works)
2992 return DRM_ERR(EINVAL);
2993 value = RADEON_SCRATCH_REG_OFFSET;
2994 break;
2991 case RADEON_PARAM_CARD_TYPE: 2995 case RADEON_PARAM_CARD_TYPE:
2992 if (dev_priv->flags & CHIP_IS_PCIE) 2996 if (dev_priv->flags & CHIP_IS_PCIE)
2993 value = RADEON_CARD_PCIE; 2997 value = RADEON_CARD_PCIE;