summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_kms.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-04-09 10:35:42 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-04-11 09:22:05 -0400
commit902aaef6c698ce0f04a6acab2d5396519d5de330 (patch)
tree1ba894574742ade2579aeebfd18a7bf414795887 /drivers/gpu/drm/radeon/radeon_kms.c
parentcedb655a3a7764c3fd946077944383c9e0e68dd4 (diff)
drm/radeon: add ring working query
Add new ioctl option and bumb minor version number. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 8365c75b31b6..3037c38d9aa9 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -379,6 +379,23 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
case RADEON_INFO_FASTFB_WORKING:
value = rdev->fastfb_working;
break;
+ case RADEON_INFO_RING_WORKING:
+ switch (value) {
+ case RADEON_CS_RING_GFX:
+ case RADEON_CS_RING_COMPUTE:
+ value = rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready;
+ break;
+ case RADEON_CS_RING_DMA:
+ value = rdev->ring[R600_RING_TYPE_DMA_INDEX].ready;
+ value |= rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready;
+ break;
+ case RADEON_CS_RING_UVD:
+ value = rdev->ring[R600_RING_TYPE_UVD_INDEX].ready;
+ break;
+ default:
+ return -EINVAL;
+ }
+ break;
default:
DRM_DEBUG_KMS("Invalid request %d\n", info->request);
return -EINVAL;