diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-08-24 16:56:21 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-25 11:21:43 -0400 |
commit | 75c65480ba7d56e2ee164057ce8ab879931a3978 (patch) | |
tree | 206539d4b9cbd5495b699b069f098d0de212e1f5 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
parent | 810ddc3ab52dd84f4cd28ee8673678aece457a59 (diff) | |
download | lwn-75c65480ba7d56e2ee164057ce8ab879931a3978.tar.gz lwn-75c65480ba7d56e2ee164057ce8ab879931a3978.zip |
drm/amdgpu: track the number of vce rings
Rather than using a hardcoded value. This allows
different versions to expose more or less rings.
No functional change.
Reviewed-by: JimQu <Jim.Qu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index b78e74048f3d..f1b9e0f2869f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -296,7 +296,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file break; case AMDGPU_HW_IP_VCE: type = AMD_IP_BLOCK_TYPE_VCE; - for (i = 0; i < AMDGPU_MAX_VCE_RINGS; i++) + for (i = 0; i < adev->vce.num_rings; i++) ring_mask |= ((adev->vce.ring[i].ready ? 1 : 0) << i); ib_start_alignment = AMDGPU_GPU_PAGE_SIZE; ib_size_alignment = 1; |