[PATCH 15/17] drm/amdgpu: add AMDGPU_HW_IP_VCN_JPEG_ENC to info query

boyuan.zhang at amd.com boyuan.zhang at amd.com
Thu Jul 4 16:04:27 UTC 2019


From: Boyuan Zhang <boyuan.zhang at amd.com>

Add AMDGPU_HW_IP_VCN_JPEG_ENC type to info query

Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 8ced7841c23f..f763d20468f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -424,6 +424,13 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
 		ib_start_alignment = 16;
 		ib_size_alignment = 16;
 		break;
+	case AMDGPU_HW_IP_VCN_JPEG_ENC:
+		type = AMD_IP_BLOCK_TYPE_VCN;
+		if (adev->vcn.ring_jpeg_enc.sched.ready)
+			++num_rings;
+		ib_start_alignment = 16;
+		ib_size_alignment = 16;
+		break;
 	default:
 		return -EINVAL;
 	}
@@ -552,6 +559,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 		case AMDGPU_HW_IP_VCN_DEC:
 		case AMDGPU_HW_IP_VCN_ENC:
 		case AMDGPU_HW_IP_VCN_JPEG:
+		case AMDGPU_HW_IP_VCN_JPEG_ENC:
 			type = AMD_IP_BLOCK_TYPE_VCN;
 			break;
 		default:
-- 
2.17.1



More information about the amd-gfx mailing list