mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 19:46:41 +07:00
drm/radeon/dpm: add late_enable for rs780/rs880/rv6xx
Make sure interrupts are enabled before we enable thermal interrupts. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
914a89872b
commit
a4643ba340
@ -777,6 +777,22 @@ bool r600_is_internal_thermal_sensor(enum radeon_int_thermal_type sensor)
|
||||
}
|
||||
}
|
||||
|
||||
int r600_dpm_late_enable(struct radeon_device *rdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (rdev->irq.installed &&
|
||||
r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) {
|
||||
ret = r600_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX);
|
||||
if (ret)
|
||||
return ret;
|
||||
rdev->irq.dpm_thermal = true;
|
||||
radeon_irq_set(rdev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
union power_info {
|
||||
struct _ATOM_POWERPLAY_INFO info;
|
||||
struct _ATOM_POWERPLAY_INFO_V2 info_2;
|
||||
|
@ -1045,6 +1045,7 @@ static struct radeon_asic rv6xx_asic = {
|
||||
.init = &rv6xx_dpm_init,
|
||||
.setup_asic = &rv6xx_setup_asic,
|
||||
.enable = &rv6xx_dpm_enable,
|
||||
.late_enable = &r600_dpm_late_enable,
|
||||
.disable = &rv6xx_dpm_disable,
|
||||
.pre_set_power_state = &r600_dpm_pre_set_power_state,
|
||||
.set_power_state = &rv6xx_dpm_set_power_state,
|
||||
@ -1135,6 +1136,7 @@ static struct radeon_asic rs780_asic = {
|
||||
.init = &rs780_dpm_init,
|
||||
.setup_asic = &rs780_dpm_setup_asic,
|
||||
.enable = &rs780_dpm_enable,
|
||||
.late_enable = &r600_dpm_late_enable,
|
||||
.disable = &rs780_dpm_disable,
|
||||
.pre_set_power_state = &r600_dpm_pre_set_power_state,
|
||||
.set_power_state = &rs780_dpm_set_power_state,
|
||||
|
@ -392,6 +392,7 @@ int rv6xx_get_temp(struct radeon_device *rdev);
|
||||
int r600_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk);
|
||||
int r600_dpm_pre_set_power_state(struct radeon_device *rdev);
|
||||
void r600_dpm_post_set_power_state(struct radeon_device *rdev);
|
||||
int r600_dpm_late_enable(struct radeon_device *rdev);
|
||||
/* r600 dma */
|
||||
uint32_t r600_dma_get_rptr(struct radeon_device *rdev,
|
||||
struct radeon_ring *ring);
|
||||
|
Loading…
Reference in New Issue
Block a user