drm/radeon/ci: implement get_current_sclk/mclk
Will be used for exposing current clocks via 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
ca1110bc5b
commit
dbbd3c81b0
|
@ -5922,6 +5922,20 @@ void ci_dpm_print_power_state(struct radeon_device *rdev,
|
||||||
r600_dpm_print_ps_status(rdev, rps);
|
r600_dpm_print_ps_status(rdev, rps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 ci_dpm_get_current_sclk(struct radeon_device *rdev)
|
||||||
|
{
|
||||||
|
u32 sclk = ci_get_average_sclk_freq(rdev);
|
||||||
|
|
||||||
|
return sclk;
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 ci_dpm_get_current_mclk(struct radeon_device *rdev)
|
||||||
|
{
|
||||||
|
u32 mclk = ci_get_average_mclk_freq(rdev);
|
||||||
|
|
||||||
|
return mclk;
|
||||||
|
}
|
||||||
|
|
||||||
u32 ci_dpm_get_sclk(struct radeon_device *rdev, bool low)
|
u32 ci_dpm_get_sclk(struct radeon_device *rdev, bool low)
|
||||||
{
|
{
|
||||||
struct ci_power_info *pi = ci_get_pi(rdev);
|
struct ci_power_info *pi = ci_get_pi(rdev);
|
||||||
|
|
|
@ -2137,6 +2137,8 @@ static struct radeon_asic ci_asic = {
|
||||||
.fan_ctrl_get_mode = &ci_fan_ctrl_get_mode,
|
.fan_ctrl_get_mode = &ci_fan_ctrl_get_mode,
|
||||||
.get_fan_speed_percent = &ci_fan_ctrl_get_fan_speed_percent,
|
.get_fan_speed_percent = &ci_fan_ctrl_get_fan_speed_percent,
|
||||||
.set_fan_speed_percent = &ci_fan_ctrl_set_fan_speed_percent,
|
.set_fan_speed_percent = &ci_fan_ctrl_set_fan_speed_percent,
|
||||||
|
.get_current_sclk = &ci_dpm_get_current_sclk,
|
||||||
|
.get_current_mclk = &ci_dpm_get_current_mclk,
|
||||||
},
|
},
|
||||||
.pflip = {
|
.pflip = {
|
||||||
.page_flip = &evergreen_page_flip,
|
.page_flip = &evergreen_page_flip,
|
||||||
|
|
|
@ -874,6 +874,8 @@ int ci_dpm_force_performance_level(struct radeon_device *rdev,
|
||||||
enum radeon_dpm_forced_level level);
|
enum radeon_dpm_forced_level level);
|
||||||
bool ci_dpm_vblank_too_short(struct radeon_device *rdev);
|
bool ci_dpm_vblank_too_short(struct radeon_device *rdev);
|
||||||
void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate);
|
void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate);
|
||||||
|
u32 ci_dpm_get_current_sclk(struct radeon_device *rdev);
|
||||||
|
u32 ci_dpm_get_current_mclk(struct radeon_device *rdev);
|
||||||
|
|
||||||
int ci_fan_ctrl_get_fan_speed_percent(struct radeon_device *rdev,
|
int ci_fan_ctrl_get_fan_speed_percent(struct radeon_device *rdev,
|
||||||
u32 *speed);
|
u32 *speed);
|
||||||
|
|
Loading…
Reference in a new issue