drm/amdgpu: use the num_rings variable for checking vce rings
Subsystems (2)
PATCH 1/1 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.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -2
@@ -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 ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1484169185-11012-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 11.01.2017 um 22:13 schrieb Alex Deucher:
Quoted 4 lines
Difference families may have different numbers of rings. Use the variable rather than a hardcoded number.
Signed-off-by Alex Deucher <[email protected]>
Reviewed-by Christian König <[email protected]>.
Quoted 11 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0@@ -75,10 +75,10 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type, *out_ring = &adev->uvd.ring;break ;
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type, · line 84
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2
-2case 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 ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx