diff options
author | Dave Airlie <airlied@redhat.com> | 2015-08-17 00:13:53 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-08-17 00:13:53 -0400 |
commit | 4eebf60b7452fbd551fd7dece855ba7825a49cbc (patch) | |
tree | 490b4d194ba09c90e10201ab7fc084a0bda0ed27 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
parent | 8f9cb50789e76f3e224e8861adf650e55c747af4 (diff) | |
parent | 2c6625cd545bdd66acff14f3394865d43920a5c7 (diff) |
Merge tag 'v4.2-rc7' into drm-next
Linux 4.2-rc7
Backmerge master for i915 fixes
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 8c40a9671b9f..93000af92283 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -242,7 +242,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
242 | 242 | ||
243 | for (i = 0; i < adev->num_ip_blocks; i++) { | 243 | for (i = 0; i < adev->num_ip_blocks; i++) { |
244 | if (adev->ip_blocks[i].type == type && | 244 | if (adev->ip_blocks[i].type == type && |
245 | adev->ip_block_enabled[i]) { | 245 | adev->ip_block_status[i].valid) { |
246 | ip.hw_ip_version_major = adev->ip_blocks[i].major; | 246 | ip.hw_ip_version_major = adev->ip_blocks[i].major; |
247 | ip.hw_ip_version_minor = adev->ip_blocks[i].minor; | 247 | ip.hw_ip_version_minor = adev->ip_blocks[i].minor; |
248 | ip.capabilities_flags = 0; | 248 | ip.capabilities_flags = 0; |
@@ -281,7 +281,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
281 | 281 | ||
282 | for (i = 0; i < adev->num_ip_blocks; i++) | 282 | for (i = 0; i < adev->num_ip_blocks; i++) |
283 | if (adev->ip_blocks[i].type == type && | 283 | if (adev->ip_blocks[i].type == type && |
284 | adev->ip_block_enabled[i] && | 284 | adev->ip_block_status[i].valid && |
285 | count < AMDGPU_HW_IP_INSTANCE_MAX_COUNT) | 285 | count < AMDGPU_HW_IP_INSTANCE_MAX_COUNT) |
286 | count++; | 286 | count++; |
287 | 287 | ||
@@ -324,16 +324,17 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
324 | break; | 324 | break; |
325 | case AMDGPU_INFO_FW_GFX_RLC: | 325 | case AMDGPU_INFO_FW_GFX_RLC: |
326 | fw_info.ver = adev->gfx.rlc_fw_version; | 326 | fw_info.ver = adev->gfx.rlc_fw_version; |
327 | fw_info.feature = 0; | 327 | fw_info.feature = adev->gfx.rlc_feature_version; |
328 | break; | 328 | break; |
329 | case AMDGPU_INFO_FW_GFX_MEC: | 329 | case AMDGPU_INFO_FW_GFX_MEC: |
330 | if (info->query_fw.index == 0) | 330 | if (info->query_fw.index == 0) { |
331 | fw_info.ver = adev->gfx.mec_fw_version; | 331 | fw_info.ver = adev->gfx.mec_fw_version; |
332 | else if (info->query_fw.index == 1) | 332 | fw_info.feature = adev->gfx.mec_feature_version; |
333 | } else if (info->query_fw.index == 1) { | ||
333 | fw_info.ver = adev->gfx.mec2_fw_version; | 334 | fw_info.ver = adev->gfx.mec2_fw_version; |
334 | else | 335 | fw_info.feature = adev->gfx.mec2_feature_version; |
336 | } else | ||
335 | return -EINVAL; | 337 | return -EINVAL; |
336 | fw_info.feature = 0; | ||
337 | break; | 338 | break; |
338 | case AMDGPU_INFO_FW_SMC: | 339 | case AMDGPU_INFO_FW_SMC: |
339 | fw_info.ver = adev->pm.fw_version; | 340 | fw_info.ver = adev->pm.fw_version; |
@@ -343,7 +344,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
343 | if (info->query_fw.index >= 2) | 344 | if (info->query_fw.index >= 2) |
344 | return -EINVAL; | 345 | return -EINVAL; |
345 | fw_info.ver = adev->sdma[info->query_fw.index].fw_version; | 346 | fw_info.ver = adev->sdma[info->query_fw.index].fw_version; |
346 | fw_info.feature = 0; | 347 | fw_info.feature = adev->sdma[info->query_fw.index].feature_version; |
347 | break; | 348 | break; |
348 | default: | 349 | default: |
349 | return -EINVAL; | 350 | return -EINVAL; |
@@ -423,7 +424,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
423 | return n ? -EFAULT : 0; | 424 | return n ? -EFAULT : 0; |
424 | } | 425 | } |
425 | case AMDGPU_INFO_DEV_INFO: { | 426 | case AMDGPU_INFO_DEV_INFO: { |
426 | struct drm_amdgpu_info_device dev_info; | 427 | struct drm_amdgpu_info_device dev_info = {}; |
427 | struct amdgpu_cu_info cu_info; | 428 | struct amdgpu_cu_info cu_info; |
428 | 429 | ||
429 | dev_info.device_id = dev->pdev->device; | 430 | dev_info.device_id = dev->pdev->device; |
@@ -466,6 +467,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
466 | memcpy(&dev_info.cu_bitmap[0], &cu_info.bitmap[0], sizeof(cu_info.bitmap)); | 467 | memcpy(&dev_info.cu_bitmap[0], &cu_info.bitmap[0], sizeof(cu_info.bitmap)); |
467 | dev_info.vram_type = adev->mc.vram_type; | 468 | dev_info.vram_type = adev->mc.vram_type; |
468 | dev_info.vram_bit_width = adev->mc.vram_width; | 469 | dev_info.vram_bit_width = adev->mc.vram_width; |
470 | dev_info.vce_harvest_config = adev->vce.harvest_config; | ||
469 | 471 | ||
470 | return copy_to_user(out, &dev_info, | 472 | return copy_to_user(out, &dev_info, |
471 | min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0; | 473 | min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0; |