Commit 7dbc15db authored by Rex Zhu's avatar Rex Zhu Committed by Tim Gardner

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

BugLink: http://bugs.launchpad.net/bugs/1546572

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>
(cherry picked from commit cae9b9c8)
Signed-off-by: default avatarAlberto Milone <alberto.milone@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 017fa747
......@@ -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)
{
struct PP_TemperatureRange range;
range.max = TEMP_RANGE_MAX;
range.min = TEMP_RANGE_MIN;
return phm_start_thermal_controller(eventmgr->hwmgr, &range);
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 0;
}
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