Commit cae9b9c8 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/powerplay: check whether need to enable thermal control. (v2)

In I+A platform(skylake), it is controlled by intel.

v2: integrate Tom's fix
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
parent 88b8dcbe
...@@ -418,10 +418,17 @@ int pem_task_create_user_performance_state(struct pp_eventmgr *eventmgr, struct ...@@ -418,10 +418,17 @@ int pem_task_create_user_performance_state(struct pp_eventmgr *eventmgr, struct
int pem_task_initialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) int pem_task_initialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
{ {
struct PP_TemperatureRange range; struct PP_TemperatureRange range;
range.max = TEMP_RANGE_MAX; range.max = TEMP_RANGE_MAX;
range.min = TEMP_RANGE_MIN; range.min = TEMP_RANGE_MIN;
if (eventmgr == NULL || eventmgr->platform_descriptor == NULL)
return -EINVAL;
if (phm_cap_enabled(eventmgr->platform_descriptor->platformCaps, PHM_PlatformCaps_ThermalController))
return phm_start_thermal_controller(eventmgr->hwmgr, &range); return phm_start_thermal_controller(eventmgr->hwmgr, &range);
return 0;
} }
int pem_task_uninitialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) int pem_task_uninitialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment