projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ca9416
)
drm: radeon: implement RADEON_PARAM_SCRATCH_OFFSET getparam
author
Michel Dänzer
<michel@tungstengraphics.com>
Mon, 7 Aug 2006 10:33:57 +0000
(20:33 +1000)
committer
Dave Airlie
<airlied@linux.ie>
Thu, 21 Sep 2006 19:32:30 +0000
(
05:32
+1000)
When this succeeds, userspace can read the scratch register contents from th mapped writeback page directly.
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/radeon_state.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/drm/radeon_state.c
b/drivers/char/drm/radeon_state.c
index 99589fe0032f4d7c5d4d7724f71601fe1edf4455..0433ff80cb70983cecd1fd08bb68630fd84934e9 100644
(file)
--- 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)
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)
value = RADEON_CARD_PCIE;