Skip to content

Commit

Permalink
drm: radeon: implement RADEON_PARAM_SCRATCH_OFFSET getparam
Browse files Browse the repository at this point in the history
When this succeeds, userspace can read the scratch register contents from th    mapped writeback page directly.

Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Michel Dänzer authored and Dave Airlie committed Sep 21, 2006
1 parent 9ca9416 commit 8624ecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/char/drm/radeon_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8624ecb

Please sign in to comment.