diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-10-13 17:41:13 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-25 14:38:45 -0400 |
commit | a12551072126758ecb0743147054f22bf233bb7d (patch) | |
tree | f3850a0b1945b6620fd591cafdb8ecb998b01302 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
parent | cf35c7ca3d50286a3ac7672aa7d26a8d2e930706 (diff) |
drm/amdgpu: rework IP block registration (v2)
This makes it easier to replace specific IP blocks on
asics for handling virtual_dce, DAL, etc. and for building
IP lists for hw or tables. This also stored the status
information in the same structure.
v2: split out spelling fix into a separate patch
add a function to add IPs to the list
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 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 3570124ed186..d17424663fe2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -306,10 +306,10 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
306 | } | 306 | } |
307 | 307 | ||
308 | for (i = 0; i < adev->num_ip_blocks; i++) { | 308 | for (i = 0; i < adev->num_ip_blocks; i++) { |
309 | if (adev->ip_blocks[i].type == type && | 309 | if (adev->ip_blocks[i].version->type == type && |
310 | adev->ip_block_status[i].valid) { | 310 | adev->ip_blocks[i].status.valid) { |
311 | ip.hw_ip_version_major = adev->ip_blocks[i].major; | 311 | ip.hw_ip_version_major = adev->ip_blocks[i].version->major; |
312 | ip.hw_ip_version_minor = adev->ip_blocks[i].minor; | 312 | ip.hw_ip_version_minor = adev->ip_blocks[i].version->minor; |
313 | ip.capabilities_flags = 0; | 313 | ip.capabilities_flags = 0; |
314 | ip.available_rings = ring_mask; | 314 | ip.available_rings = ring_mask; |
315 | ip.ib_start_alignment = ib_start_alignment; | 315 | ip.ib_start_alignment = ib_start_alignment; |
@@ -345,8 +345,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
345 | } | 345 | } |
346 | 346 | ||
347 | for (i = 0; i < adev->num_ip_blocks; i++) | 347 | for (i = 0; i < adev->num_ip_blocks; i++) |
348 | if (adev->ip_blocks[i].type == type && | 348 | if (adev->ip_blocks[i].version->type == type && |
349 | adev->ip_block_status[i].valid && | 349 | adev->ip_blocks[i].status.valid && |
350 | count < AMDGPU_HW_IP_INSTANCE_MAX_COUNT) | 350 | count < AMDGPU_HW_IP_INSTANCE_MAX_COUNT) |
351 | count++; | 351 | count++; |
352 | 352 | ||