Commit 8624ecbf authored by Michel Dänzer's avatar Michel Dänzer Committed by Dave Airlie

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: default avatarDave Airlie <airlied@linux.ie>
parent 9ca94161
...@@ -2987,7 +2987,11 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS) ...@@ -2987,7 +2987,11 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS)
case RADEON_PARAM_GART_TEX_HANDLE: case RADEON_PARAM_GART_TEX_HANDLE:
value = dev_priv->gart_textures_offset; value = dev_priv->gart_textures_offset;
break; 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: case RADEON_PARAM_CARD_TYPE:
if (dev_priv->flags & CHIP_IS_PCIE) if (dev_priv->flags & CHIP_IS_PCIE)
value = RADEON_CARD_PCIE; value = RADEON_CARD_PCIE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment