mirror of https://gitee.com/openkylin/linux.git
drm/radeon/dpm: add new callbacks to get the current sclk/mclk
Needed to to expose the current clocks via the INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d6d2a1882a
commit
d7dbce09b6
|
@ -1984,6 +1984,8 @@ struct radeon_asic {
|
||||||
u32 (*fan_ctrl_get_mode)(struct radeon_device *rdev);
|
u32 (*fan_ctrl_get_mode)(struct radeon_device *rdev);
|
||||||
int (*set_fan_speed_percent)(struct radeon_device *rdev, u32 speed);
|
int (*set_fan_speed_percent)(struct radeon_device *rdev, u32 speed);
|
||||||
int (*get_fan_speed_percent)(struct radeon_device *rdev, u32 *speed);
|
int (*get_fan_speed_percent)(struct radeon_device *rdev, u32 *speed);
|
||||||
|
u32 (*get_current_sclk)(struct radeon_device *rdev);
|
||||||
|
u32 (*get_current_mclk)(struct radeon_device *rdev);
|
||||||
} dpm;
|
} dpm;
|
||||||
/* pageflipping */
|
/* pageflipping */
|
||||||
struct {
|
struct {
|
||||||
|
@ -2949,6 +2951,8 @@ static inline void radeon_ring_write(struct radeon_ring *ring, uint32_t v)
|
||||||
#define radeon_dpm_vblank_too_short(rdev) rdev->asic->dpm.vblank_too_short((rdev))
|
#define radeon_dpm_vblank_too_short(rdev) rdev->asic->dpm.vblank_too_short((rdev))
|
||||||
#define radeon_dpm_powergate_uvd(rdev, g) rdev->asic->dpm.powergate_uvd((rdev), (g))
|
#define radeon_dpm_powergate_uvd(rdev, g) rdev->asic->dpm.powergate_uvd((rdev), (g))
|
||||||
#define radeon_dpm_enable_bapm(rdev, e) rdev->asic->dpm.enable_bapm((rdev), (e))
|
#define radeon_dpm_enable_bapm(rdev, e) rdev->asic->dpm.enable_bapm((rdev), (e))
|
||||||
|
#define radeon_dpm_get_current_sclk(rdev) rdev->asic->dpm.get_current_sclk((rdev))
|
||||||
|
#define radeon_dpm_get_current_mclk(rdev) rdev->asic->dpm.get_current_mclk((rdev))
|
||||||
|
|
||||||
/* Common functions */
|
/* Common functions */
|
||||||
/* AGP */
|
/* AGP */
|
||||||
|
|
Loading…
Reference in New Issue