Skip to content

Commit b6360a5

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amd/pm: disallow the fan setting if there is no fan on smu 13.0.0
drm/amd/pm: disallow the fan setting if there is no fan on smu 13.0.0 V2: depend on pm.no_fan to check Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 2ccdd1b commit b6360a5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ static int smu_v13_0_0_check_powerplay_table(struct smu_context *smu)
331331
struct smu_13_0_0_powerplay_table *powerplay_table =
332332
table_context->power_play_table;
333333
struct smu_baco_context *smu_baco = &smu->smu_baco;
334+
PPTable_t *pptable = smu->smu_table.driver_pptable;
334335
#if 0
335336
PPTable_t *pptable = smu->smu_table.driver_pptable;
336337
const OverDriveLimits_t * const overdrive_upperlimits =
@@ -371,6 +372,9 @@ static int smu_v13_0_0_check_powerplay_table(struct smu_context *smu)
371372
table_context->thermal_controller_type =
372373
powerplay_table->thermal_controller_type;
373374

375+
smu->adev->pm.no_fan =
376+
!(pptable->SkuTable.FeaturesToRun[0] & (1 << FEATURE_FAN_CONTROL_BIT));
377+
374378
return 0;
375379
}
376380

0 commit comments

Comments
 (0)