Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 034041f3 authored by Alex Deucher's avatar Alex Deucher
Browse files

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: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f1543f58
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;