drm/amdgpu: add AMDGPU_HW_IP_UVD_ENC to info query
authorLeo Liu <leo.liu@amd.com>
Tue, 10 Jan 2017 16:50:08 +0000 (11:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:53:47 +0000 (23:53 -0400)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index 099a90e98a39eaba0af51173e842e03e92ffc661..ef91c8e2b8e37d2802de22fd754db87f3a489b82 100644 (file)
@@ -309,6 +309,13 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
                        ib_start_alignment = AMDGPU_GPU_PAGE_SIZE;
                        ib_size_alignment = 1;
                        break;
+               case AMDGPU_HW_IP_UVD_ENC:
+                       type = AMD_IP_BLOCK_TYPE_UVD;
+                       for (i = 0; i < adev->uvd.num_enc_rings; i++)
+                               ring_mask |= ((adev->uvd.ring_enc[i].ready ? 1 : 0) << i);
+                       ib_start_alignment = AMDGPU_GPU_PAGE_SIZE;
+                       ib_size_alignment = 1;
+                       break;
                default:
                        return -EINVAL;
                }
@@ -348,6 +355,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
                case AMDGPU_HW_IP_VCE:
                        type = AMD_IP_BLOCK_TYPE_VCE;
                        break;
+               case AMDGPU_HW_IP_UVD_ENC:
+                       type = AMD_IP_BLOCK_TYPE_UVD;
+                       break;
                default:
                        return -EINVAL;
                }