forked from Minki/linux
drm/amdgpu: use the num_rings variable for checking vce rings
Difference families may have different numbers of rings. Use the variable rather than a hardcoded number. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f1543f58cb
commit
034041f334
@ -75,10 +75,10 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type,
|
||||
*out_ring = &adev->uvd.ring;
|
||||
break;
|
||||
case AMDGPU_HW_IP_VCE:
|
||||
if (ring < 2){
|
||||
if (ring < adev->vce.num_rings){
|
||||
*out_ring = &adev->vce.ring[ring];
|
||||
} else {
|
||||
DRM_ERROR("only two VCE rings are supported\n");
|
||||
DRM_ERROR("only %d VCE rings are supported\n", adev->vce.num_rings);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user