summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-07-19 19:07:06 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-07-19 19:07:06 +0200
commite337eadcec9c1e2cf885167c076ab2407bd6c090 (patch)
tree88492891de10b89384f56b65a054aa83a983eb64 /shared-core
parent7dea64677b62418b14d34c41399cdb8bf8b817cd (diff)
Implement RADEON_PARAM_SCRATCH_OFFSET getparam.
When this succeeds, userspace can read the scratch register contents from the mapped writeback page directly.
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/radeon_state.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c
index 2c169ac5..58251dd7 100644
--- a/shared-core/radeon_state.c
+++ b/shared-core/radeon_state.c
@@ -3025,6 +3025,11 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS)
case RADEON_PARAM_GART_TEX_HANDLE:
value = dev_priv->gart_textures_offset;
break;
+ case RADEON_PARAM_SCRATCH_OFFSET:
+ if (!dev_priv->writeback_works)
+ return DRM_ERR(EINVAL);
+ value = RADEON_SCRATCH_REG_OFFSET;
+ break;
case RADEON_PARAM_CARD_TYPE:
if (dev_priv->flags & CHIP_IS_PCIE)