diff options
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c index 8ca32803c2ed..fdd67c65c724 100644 --- a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c +++ b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c @@ -32,6 +32,9 @@ #include "amd_powerplay.h" #include "psm.h" +#define TEMP_RANGE_MIN (90 * 1000) +#define TEMP_RANGE_MAX (120 * 1000) + int pem_task_update_allowed_performance_levels(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) { @@ -104,8 +107,6 @@ int pem_task_unregister_interrupts(struct pp_eventmgr *eventmgr, struct pem_even return pem_unregister_interrupts(eventmgr); } - - int pem_task_get_boot_state_id(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) { int result; @@ -415,3 +416,16 @@ restart_search: return -1; } +int pem_task_initialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) +{ + struct PP_TemperatureRange range; + range.max = TEMP_RANGE_MAX; + range.min = TEMP_RANGE_MIN; + + return phm_start_thermal_controller(eventmgr->hwmgr, &range); +} + +int pem_task_uninitialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) +{ + return phm_stop_thermal_controller(eventmgr->hwmgr); +}
\ No newline at end of file |