Skip to content

Commit 8f2bf88

Browse files
Evan Quanalexdeucher
authored andcommitted
drm/amd/powerplay: set max fan target temperature as 105C
A workaround to override the fan target temperature in SMC table. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 59d3191 commit 8f2bf88

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "cgs_common.h"
3333
#include "vega20_pptable.h"
3434

35+
#define VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE 105
36+
3537
static void set_hw_cap(struct pp_hwmgr *hwmgr, bool enable,
3638
enum phm_platform_caps cap)
3739
{
@@ -798,6 +800,17 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
798800
return 0;
799801
}
800802

803+
static int override_powerplay_table_fantargettemperature(struct pp_hwmgr *hwmgr)
804+
{
805+
struct phm_ppt_v3_information *pptable_information =
806+
(struct phm_ppt_v3_information *)hwmgr->pptable;
807+
PPTable_t *ppsmc_pptable = (PPTable_t *)(pptable_information->smc_pptable);
808+
809+
ppsmc_pptable->FanTargetTemperature = VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE;
810+
811+
return 0;
812+
}
813+
801814
#define VEGA20_ENGINECLOCK_HARDMAX 198000
802815
static int init_powerplay_table_information(
803816
struct pp_hwmgr *hwmgr,
@@ -887,6 +900,10 @@ static int init_powerplay_table_information(
887900

888901

889902
result = append_vbios_pptable(hwmgr, (pptable_information->smc_pptable));
903+
if (result)
904+
return result;
905+
906+
result = override_powerplay_table_fantargettemperature(hwmgr);
890907

891908
return result;
892909
}

0 commit comments

Comments
 (0)