diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-10-08 16:30:37 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-10-14 16:16:36 -0400 |
commit | c113ea1c4f4a7592f17e53d658873b83af0dbb4b (patch) | |
tree | 9c245bfb3b9892a4f1b70b243329acf27e157c12 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
parent | 756e6880c51376d2e4d53050582d66d88fc281c7 (diff) |
drm/amdgpu: rework sdma structures
Rework the sdma structures in the driver to
consolidate all of the sdma info into a single
structure and allow for asics that may have
different numbers of sdma instances.
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 78233225dd36..3f5f2d58ad94 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -218,8 +218,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
218 | break; | 218 | break; |
219 | case AMDGPU_HW_IP_DMA: | 219 | case AMDGPU_HW_IP_DMA: |
220 | type = AMD_IP_BLOCK_TYPE_SDMA; | 220 | type = AMD_IP_BLOCK_TYPE_SDMA; |
221 | ring_mask = adev->sdma[0].ring.ready ? 1 : 0; | 221 | for (i = 0; i < adev->sdma.num_instances; i++) |
222 | ring_mask |= ((adev->sdma[1].ring.ready ? 1 : 0) << 1); | 222 | ring_mask |= ((adev->sdma.instance[i].ring.ready ? 1 : 0) << i); |
223 | ib_start_alignment = AMDGPU_GPU_PAGE_SIZE; | 223 | ib_start_alignment = AMDGPU_GPU_PAGE_SIZE; |
224 | ib_size_alignment = 1; | 224 | ib_size_alignment = 1; |
225 | break; | 225 | break; |
@@ -341,10 +341,10 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
341 | fw_info.feature = 0; | 341 | fw_info.feature = 0; |
342 | break; | 342 | break; |
343 | case AMDGPU_INFO_FW_SDMA: | 343 | case AMDGPU_INFO_FW_SDMA: |
344 | if (info->query_fw.index >= 2) | 344 | if (info->query_fw.index >= adev->sdma.num_instances) |
345 | return -EINVAL; | 345 | return -EINVAL; |
346 | fw_info.ver = adev->sdma[info->query_fw.index].fw_version; | 346 | fw_info.ver = adev->sdma.instance[info->query_fw.index].fw_version; |
347 | fw_info.feature = adev->sdma[info->query_fw.index].feature_version; | 347 | fw_info.feature = adev->sdma.instance[info->query_fw.index].feature_version; |
348 | break; | 348 | break; |
349 | default: | 349 | default: |
350 | return -EINVAL; | 350 | return -EINVAL; |