aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2017-04-27 03:46:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-04-28 17:33:15 -0400
commit1dfc41d44c20dc3efbd0139d7f991d13c6daa875 (patch)
treea2f322a082a1ed1669877daa2b99f94a613b36c9
parent10e709cb296c98424c03408d23e3addeddcd4088 (diff)
drm/amd/powerplay: add disable_smc_ctf callback in hwmgr.
export disablesmcctf to eventmgr. need to disable temperature alert when s3/s4. otherwise, when resume back,enable temperature alert will fail. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c10
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c1
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h2
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/hwmgr.h1
4 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index 23bba2c8b18e..fcc722ea7649 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -501,3 +501,13 @@ int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_i
501 501
502 return hwmgr->hwmgr_func->get_max_high_clocks(hwmgr, clocks); 502 return hwmgr->hwmgr_func->get_max_high_clocks(hwmgr, clocks);
503} 503}
504
505int phm_disable_smc_firmware_ctf(struct pp_hwmgr *hwmgr)
506{
507 PHM_FUNC_CHECK(hwmgr);
508
509 if (hwmgr->hwmgr_func->disable_smc_firmware_ctf == NULL)
510 return -EINVAL;
511
512 return hwmgr->hwmgr_func->disable_smc_firmware_ctf(hwmgr);
513}
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 8f663ab56a80..4ad84530c88a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -4695,6 +4695,7 @@ static const struct pp_hwmgr_func smu7_hwmgr_funcs = {
4695 .release_firmware = smu7_release_firmware, 4695 .release_firmware = smu7_release_firmware,
4696 .set_power_profile_state = smu7_set_power_profile_state, 4696 .set_power_profile_state = smu7_set_power_profile_state,
4697 .avfs_control = smu7_avfs_control, 4697 .avfs_control = smu7_avfs_control,
4698 .disable_smc_firmware_ctf = smu7_thermal_disable_alert,
4698}; 4699};
4699 4700
4700uint8_t smu7_get_sleep_divider_id_from_clock(uint32_t clock, 4701uint8_t smu7_get_sleep_divider_id_from_clock(uint32_t clock,
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
index 5345b50761f4..a1ebe1014492 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
@@ -431,6 +431,6 @@ extern int phm_display_clock_voltage_request(struct pp_hwmgr *hwmgr,
431 struct pp_display_clock_request *clock); 431 struct pp_display_clock_request *clock);
432 432
433extern int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks); 433extern int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks);
434 434extern int phm_disable_smc_firmware_ctf(struct pp_hwmgr *hwmgr);
435#endif /* _HARDWARE_MANAGER_H_ */ 435#endif /* _HARDWARE_MANAGER_H_ */
436 436
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
index 320225dd3328..98d38c31f6a6 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
@@ -373,6 +373,7 @@ struct pp_hwmgr_func {
373 int (*set_power_profile_state)(struct pp_hwmgr *hwmgr, 373 int (*set_power_profile_state)(struct pp_hwmgr *hwmgr,
374 struct amd_pp_profile *request); 374 struct amd_pp_profile *request);
375 int (*avfs_control)(struct pp_hwmgr *hwmgr, bool enable); 375 int (*avfs_control)(struct pp_hwmgr *hwmgr, bool enable);
376 int (*disable_smc_firmware_ctf)(struct pp_hwmgr *hwmgr);
376}; 377};
377 378
378struct pp_table_func { 379struct pp_table_func {