drm/amdgpu: add AMDGPU_HW_IP_VCN_JPEG to info query
authorBoyuan Zhang <boyuan.zhang@amd.com>
Tue, 1 May 2018 18:58:25 +0000 (14:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jun 2018 17:20:39 +0000 (12:20 -0500)
Add AMDGPU_HW_IP_VCN_JPEG to info query

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index c472bb53e41df98cebb24cfab56affdb32d393ff..ec1060a5eab3acfd33b59b9cd055a5228bbf285d 100644 (file)
@@ -383,6 +383,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_JPEG:
+                       type = AMD_IP_BLOCK_TYPE_VCN;
+                       ring_mask = adev->vcn.ring_jpeg.ready ? 1 : 0;
+                       ib_start_alignment = AMDGPU_GPU_PAGE_SIZE;
+                       ib_size_alignment = 16;
+                       break;
                default:
                        return -EINVAL;
                }
@@ -427,6 +433,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
                        break;
                case AMDGPU_HW_IP_VCN_DEC:
                case AMDGPU_HW_IP_VCN_ENC:
+               case AMDGPU_HW_IP_VCN_JPEG:
                        type = AMD_IP_BLOCK_TYPE_VCN;
                        break;
                default: