From: Leo Liu <[email protected]>

Signed-off-by: Leo Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 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 60948a7..1375a89 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.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to