drm/amdgpu: add AMDGPU_HW_IP_VCN_DEC to info query
authorLeo Liu <leo.liu@amd.com>
Wed, 25 Jan 2017 20:04:20 +0000 (15:04 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 May 2017 21:41:35 +0000 (17:41 -0400)
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 1dbe76c3c3666a9cad4f554f80cee63957248ce4..9890104ae9eaa39c706d833d68cd2f0ee6e02fb0 100644 (file)
@@ -319,6 +319,12 @@ 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_VCN_DEC:
+                       type = AMD_IP_BLOCK_TYPE_VCN;
+                       ring_mask = adev->vcn.ring_dec.ready ? 1 : 0;
+                       ib_start_alignment = AMDGPU_GPU_PAGE_SIZE;
+                       ib_size_alignment = 16;
+                       break;
                default:
                        return -EINVAL;
                }
@@ -361,6 +367,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
                case AMDGPU_HW_IP_UVD_ENC:
                        type = AMD_IP_BLOCK_TYPE_UVD;
                        break;
+               case AMDGPU_HW_IP_VCN_DEC:
+                       type = AMD_IP_BLOCK_TYPE_VCN;
+                       break;
                default:
                        return -EINVAL;
                }