Skip to content

Commit 1dfc41d

Browse files
Rex Zhualexdeucher
authored andcommitted
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>
1 parent 10e709c commit 1dfc41d

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,3 +501,13 @@ int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_i
501501

502502
return hwmgr->hwmgr_func->get_max_high_clocks(hwmgr, clocks);
503503
}
504+
505+
int 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+
}

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4695,6 +4695,7 @@ static const struct pp_hwmgr_func smu7_hwmgr_funcs = {
46954695
.release_firmware = smu7_release_firmware,
46964696
.set_power_profile_state = smu7_set_power_profile_state,
46974697
.avfs_control = smu7_avfs_control,
4698+
.disable_smc_firmware_ctf = smu7_thermal_disable_alert,
46984699
};
46994700

47004701
uint8_t smu7_get_sleep_divider_id_from_clock(uint32_t clock,

drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,6 @@ extern int phm_display_clock_voltage_request(struct pp_hwmgr *hwmgr,
431431
struct pp_display_clock_request *clock);
432432

433433
extern int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks);
434-
434+
extern int phm_disable_smc_firmware_ctf(struct pp_hwmgr *hwmgr);
435435
#endif /* _HARDWARE_MANAGER_H_ */
436436

drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ struct pp_hwmgr_func {
373373
int (*set_power_profile_state)(struct pp_hwmgr *hwmgr,
374374
struct amd_pp_profile *request);
375375
int (*avfs_control)(struct pp_hwmgr *hwmgr, bool enable);
376+
int (*disable_smc_firmware_ctf)(struct pp_hwmgr *hwmgr);
376377
};
377378

378379
struct pp_table_func {

0 commit comments

Comments
 (0)