From: Leo Liu Date: Tue, 21 Feb 2017 16:24:09 +0000 (-0500) Subject: drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f93aa00c0bdc85ebd9ace72e34997cf4ba56e839;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- 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)) {