From e337eadcec9c1e2cf885167c076ab2407bd6c090 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 19 Jul 2006 19:07:06 +0200 Subject: [PATCH] Implement RADEON_PARAM_SCRATCH_OFFSET getparam. When this succeeds, userspace can read the scratch register contents from the mapped writeback page directly. --- shared-core/radeon_state.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c index 2c169ac..58251dd 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) -- 2.7.4