summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-12-13 12:27:28 -0500
committerAlex Deucher <alexander.deucher@amd.com>2012-12-14 10:45:26 -0500
commit278a334cbc96d3da66d56235b8ce84081e9a1892 (patch)
treeb5359119856453cdd69277003861e0a9a9e2b408 /drivers/gpu
parentcd459e525f4faeefa0bf78e1bcba3e04496b2cb5 (diff)
downloadtalos-op-linux-278a334cbc96d3da66d56235b8ce84081e9a1892.tar.gz
talos-op-linux-278a334cbc96d3da66d56235b8ce84081e9a1892.zip
drm/radeon: enable the async DMA rings in the CS ioctl
This enables the functionality added in the previous patches. Userspace acceleration drivers can use the CS ioctl to submit command buffers to the async DMA rings. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 1b32a5ab972d..396baba0141a 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -112,6 +112,18 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
} else
p->ring = RADEON_RING_TYPE_GFX_INDEX;
break;
+ case RADEON_CS_RING_DMA:
+ if (p->rdev->family >= CHIP_CAYMAN) {
+ if (p->priority > 0)
+ p->ring = R600_RING_TYPE_DMA_INDEX;
+ else
+ p->ring = CAYMAN_RING_TYPE_DMA1_INDEX;
+ } else if (p->rdev->family >= CHIP_R600) {
+ p->ring = R600_RING_TYPE_DMA_INDEX;
+ } else {
+ return -EINVAL;
+ }
+ break;
}
return 0;
}
OpenPOWER on IntegriCloud