Commit 902aaef6 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/radeon: add ring working query

Add new ioctl option and bumb minor version number.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cedb655a
...@@ -72,9 +72,10 @@ ...@@ -72,9 +72,10 @@
* 2.29.0 - R500 FP16 color clear registers * 2.29.0 - R500 FP16 color clear registers
* 2.30.0 - fix for FMASK texturing * 2.30.0 - fix for FMASK texturing
* 2.31.0 - Add fastfb support for rs690 * 2.31.0 - Add fastfb support for rs690
* 2.32.0 - new info request for rings working
*/ */
#define KMS_DRIVER_MAJOR 2 #define KMS_DRIVER_MAJOR 2
#define KMS_DRIVER_MINOR 31 #define KMS_DRIVER_MINOR 32
#define KMS_DRIVER_PATCHLEVEL 0 #define KMS_DRIVER_PATCHLEVEL 0
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
int radeon_driver_unload_kms(struct drm_device *dev); int radeon_driver_unload_kms(struct drm_device *dev);
......
...@@ -379,6 +379,23 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) ...@@ -379,6 +379,23 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
case RADEON_INFO_FASTFB_WORKING: case RADEON_INFO_FASTFB_WORKING:
value = rdev->fastfb_working; value = rdev->fastfb_working;
break; 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: default:
DRM_DEBUG_KMS("Invalid request %d\n", info->request); DRM_DEBUG_KMS("Invalid request %d\n", info->request);
return -EINVAL; return -EINVAL;
......
...@@ -975,6 +975,8 @@ struct drm_radeon_cs { ...@@ -975,6 +975,8 @@ struct drm_radeon_cs {
#define RADEON_INFO_MAX_SH_PER_SE 0x13 #define RADEON_INFO_MAX_SH_PER_SE 0x13
/* fast fb access is enabled */ /* fast fb access is enabled */
#define RADEON_INFO_FASTFB_WORKING 0x14 #define RADEON_INFO_FASTFB_WORKING 0x14
/* query if a RADEON_CS_RING_* submission is supported */
#define RADEON_INFO_RING_WORKING 0x15
struct drm_radeon_info { struct drm_radeon_info {
......
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