diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index eaaedba04675..35d931881b4b 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -513,6 +513,22 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
513 | value_size = sizeof(uint64_t); | 513 | value_size = sizeof(uint64_t); |
514 | value64 = atomic64_read(&rdev->gtt_usage); | 514 | value64 = atomic64_read(&rdev->gtt_usage); |
515 | break; | 515 | break; |
516 | case RADEON_INFO_ACTIVE_CU_COUNT: | ||
517 | if (rdev->family >= CHIP_BONAIRE) | ||
518 | *value = rdev->config.cik.active_cus; | ||
519 | else if (rdev->family >= CHIP_TAHITI) | ||
520 | *value = rdev->config.si.active_cus; | ||
521 | else if (rdev->family >= CHIP_CAYMAN) | ||
522 | *value = rdev->config.cayman.active_simds; | ||
523 | else if (rdev->family >= CHIP_CEDAR) | ||
524 | *value = rdev->config.evergreen.active_simds; | ||
525 | else if (rdev->family >= CHIP_RV770) | ||
526 | *value = rdev->config.rv770.active_simds; | ||
527 | else if (rdev->family >= CHIP_R600) | ||
528 | *value = rdev->config.r600.active_simds; | ||
529 | else | ||
530 | *value = 1; | ||
531 | break; | ||
516 | default: | 532 | default: |
517 | DRM_DEBUG_KMS("Invalid request %d\n", info->request); | 533 | DRM_DEBUG_KMS("Invalid request %d\n", info->request); |
518 | return -EINVAL; | 534 | return -EINVAL; |
@@ -859,4 +875,4 @@ const struct drm_ioctl_desc radeon_ioctls_kms[] = { | |||
859 | DRM_IOCTL_DEF_DRV(RADEON_GEM_VA, radeon_gem_va_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW), | 875 | DRM_IOCTL_DEF_DRV(RADEON_GEM_VA, radeon_gem_va_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW), |
860 | DRM_IOCTL_DEF_DRV(RADEON_GEM_OP, radeon_gem_op_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW), | 876 | DRM_IOCTL_DEF_DRV(RADEON_GEM_OP, radeon_gem_op_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW), |
861 | }; | 877 | }; |
862 | int radeon_max_kms_ioctl = DRM_ARRAY_SIZE(radeon_ioctls_kms); | 878 | int radeon_max_kms_ioctl = ARRAY_SIZE(radeon_ioctls_kms); |