Skip to content

Commit

Permalink
drm/amd/pm: Disable fan control if not supported
Browse files Browse the repository at this point in the history
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 <lijo.lazar@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Lijo Lazar authored and hkasivis committed Oct 25, 2021
1 parent 2a417b7 commit 5b46cf5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,27 @@ static void arcturus_check_bxco_support(struct smu_context *smu)
}
}

static void arcturus_check_fan_support(struct smu_context *smu)
{
struct smu_table_context *table_context = &smu->smu_table;
PPTable_t *pptable = table_context->driver_pptable;

/* No sort of fan control possible if PPTable has it disabled */
smu->adev->pm.no_fan =
!(pptable->FeaturesToRun[0] & FEATURE_FAN_CONTROL_MASK);
if (smu->adev->pm.no_fan)
dev_info_once(smu->adev->dev,
"PMFW based fan control disabled");
}

static int arcturus_check_powerplay_table(struct smu_context *smu)
{
struct smu_table_context *table_context = &smu->smu_table;
struct smu_11_0_powerplay_table *powerplay_table =
table_context->power_play_table;

arcturus_check_bxco_support(smu);
arcturus_check_fan_support(smu);

table_context->thermal_controller_type =
powerplay_table->thermal_controller_type;
Expand Down

0 comments on commit 5b46cf5

Please sign in to comment.