From f93aa00c0bdc85ebd9ace72e34997cf4ba56e839 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 21 Feb 2017 11:24:09 -0500 Subject: [PATCH] drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 60948a7bd247..1375a896e87b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -94,6 +94,15 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type, case AMDGPU_HW_IP_VCN_DEC: *out_ring = &adev->vcn.ring_dec; break; + case AMDGPU_HW_IP_VCN_ENC: + if (ring < adev->vcn.num_enc_rings){ + *out_ring = &adev->vcn.ring_enc[ring]; + } else { + DRM_ERROR("only %d VCN ENC rings are supported\n", + adev->vcn.num_enc_rings); + return -EINVAL; + } + break; } if (!(*out_ring && (*out_ring)->adev)) { -- 2.20.1