diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2014-09-30 18:04:40 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-03-19 19:26:27 +0300 |
commit | d6d2a1882a79c1a5425d6f82b2fc7b934916f893 (patch) | |
tree | 57d42a81db39f27a5bc5b8e1ca362aea98fbb64f /drivers | |
parent | b9729b17a414f99c61f4db9ac9f9ed987fa0cbfe (diff) | |
download | linux-d6d2a1882a79c1a5425d6f82b2fc7b934916f893.tar.xz |
drm/radeon: add INFO query for GPU temperature
Useful for profiling.
Tested-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 686411e4e4f6..7904887c6cc7 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -547,6 +547,13 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file else *value = 1; break; + case RADEON_INFO_CURRENT_GPU_TEMP: + /* get temperature in millidegrees C */ + if (rdev->asic->pm.get_temperature) + *value = radeon_get_temperature(rdev); + else + *value = 0; + break; default: DRM_DEBUG_KMS("Invalid request %d\n", info->request); return -EINVAL; |