Skip to content

Commit 5b46cf5

Browse files
Lijo Lazarhkasivis
authored andcommitted
drm/amd/pm: Disable fan control if not supported
On arcturus, not all platforms use PMFW based fan control. On such ASICs fan control by PMFW will be disabled in PPTable. Disable hwmon knobs for fan control also as it is not possible to report or control fan speed on such platforms through driver. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
1 parent 2a417b7 commit 5b46cf5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,13 +436,27 @@ static void arcturus_check_bxco_support(struct smu_context *smu)
436436
}
437437
}
438438

439+
static void arcturus_check_fan_support(struct smu_context *smu)
440+
{
441+
struct smu_table_context *table_context = &smu->smu_table;
442+
PPTable_t *pptable = table_context->driver_pptable;
443+
444+
/* No sort of fan control possible if PPTable has it disabled */
445+
smu->adev->pm.no_fan =
446+
!(pptable->FeaturesToRun[0] & FEATURE_FAN_CONTROL_MASK);
447+
if (smu->adev->pm.no_fan)
448+
dev_info_once(smu->adev->dev,
449+
"PMFW based fan control disabled");
450+
}
451+
439452
static int arcturus_check_powerplay_table(struct smu_context *smu)
440453
{
441454
struct smu_table_context *table_context = &smu->smu_table;
442455
struct smu_11_0_powerplay_table *powerplay_table =
443456
table_context->power_play_table;
444457

445458
arcturus_check_bxco_support(smu);
459+
arcturus_check_fan_support(smu);
446460

447461
table_context->thermal_controller_type =
448462
powerplay_table->thermal_controller_type;

0 commit comments

Comments
 (0)