diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-01-24 17:14:26 -0500 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2011-01-24 17:41:04 -0500 |
commit | 58bbf018a70c562437eeae121a5d021ba7fe56a5 (patch) | |
tree | 5a44a8c8f53710366e51208f63e86c3a441f256a /drivers/gpu | |
parent | b526ce2264e93b64853478ae50725a30c1dc7abf (diff) |
drm/radeon/kms: add new radeon_info ioctl query for clock crystal freq
Needed for timer queries in the 3D driver.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index d5680a0c87af..275b26a708d6 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -48,7 +48,7 @@ | |||
48 | * - 2.5.0 - add get accel 2 to work around ddx breakage for evergreen | 48 | * - 2.5.0 - add get accel 2 to work around ddx breakage for evergreen |
49 | * - 2.6.0 - add tiling config query (r6xx+), add initial HiZ support (r300->r500) | 49 | * - 2.6.0 - add tiling config query (r6xx+), add initial HiZ support (r300->r500) |
50 | * 2.7.0 - fixups for r600 2D tiling support. (no external ABI change), add eg dyn gpr regs | 50 | * 2.7.0 - fixups for r600 2D tiling support. (no external ABI change), add eg dyn gpr regs |
51 | * 2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, r300->r500 CMASK | 51 | * 2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, r300->r500 CMASK, clock crystal query |
52 | */ | 52 | */ |
53 | #define KMS_DRIVER_MAJOR 2 | 53 | #define KMS_DRIVER_MAJOR 2 |
54 | #define KMS_DRIVER_MINOR 8 | 54 | #define KMS_DRIVER_MINOR 8 |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 28a53e4a925f..98321298cffd 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -201,6 +201,10 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
201 | } | 201 | } |
202 | radeon_set_filp_rights(dev, &rdev->cmask_filp, filp, &value); | 202 | radeon_set_filp_rights(dev, &rdev->cmask_filp, filp, &value); |
203 | break; | 203 | break; |
204 | case RADEON_INFO_CLOCK_CRYSTAL_FREQ: | ||
205 | /* return clock value in KHz */ | ||
206 | value = rdev->clock.spll.reference_freq * 10; | ||
207 | break; | ||
204 | default: | 208 | default: |
205 | DRM_DEBUG_KMS("Invalid request %d\n", info->request); | 209 | DRM_DEBUG_KMS("Invalid request %d\n", info->request); |
206 | return -EINVAL; | 210 | return -EINVAL; |