summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
diff options
context:
space:
mode:
authorRex Zhu2015-10-21 04:34:22 +0200
committerAlex Deucher2015-12-21 22:42:24 +0100
commitfba4eef5847a1c9c8b49c039bc8aa6c9070d058e (patch)
tree7221481e064721250e9169bfb529649e7784b72d /drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
parentdrm/amdgpu/powerplay: mv ppinterrupt.h to inc folder to share with other subm... (diff)
downloadkernel-qcow2-linux-fba4eef5847a1c9c8b49c039bc8aa6c9070d058e.tar.gz
kernel-qcow2-linux-fba4eef5847a1c9c8b49c039bc8aa6c9070d058e.tar.xz
kernel-qcow2-linux-fba4eef5847a1c9c8b49c039bc8aa6c9070d058e.zip
drm/amdgpu/powerplay: add thermal control interface in hwmgr.
Thermal controller interface. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index 620119feb0fd..9d910f3284d0 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -194,3 +194,32 @@ int phm_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr)
return 0;
}
+
+int phm_stop_thermal_controller(struct pp_hwmgr *hwmgr)
+{
+ if (hwmgr == NULL || hwmgr->hwmgr_func->stop_thermal_controller == NULL)
+ return -EINVAL;
+
+ return hwmgr->hwmgr_func->stop_thermal_controller(hwmgr);
+}
+
+int phm_register_thermal_interrupt(struct pp_hwmgr *hwmgr, const void *info)
+{
+ if (hwmgr == NULL || hwmgr->hwmgr_func->register_internal_thermal_interrupt == NULL)
+ return -EINVAL;
+
+ return hwmgr->hwmgr_func->register_internal_thermal_interrupt(hwmgr, info);
+}
+
+/**
+* Initializes the thermal controller subsystem.
+*
+* @param pHwMgr the address of the powerplay hardware manager.
+* @param pTemperatureRange the address of the structure holding the temperature range.
+* @exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the dispatcher.
+*/
+int phm_start_thermal_controller(struct pp_hwmgr *hwmgr, struct PP_TemperatureRange *temperature_range)
+{
+
+ return phm_dispatch_table(hwmgr, &(hwmgr->start_thermal_controller), temperature_range, NULL);
+}