drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Leo Liu 2017-02-21 11:24:09 -05:00 committed by Alex Deucher
parent cefbc5989f
commit f93aa00c0b
1 changed files with 9 additions and 0 deletions

View File

@ -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)) {