Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/pm: fix incorrect FeatureCtrlMask setting on smu v14.0.x

OverDriveTable.FanMinimumPwm and FeatureCtrlMask.PP_OD_FEATURE_FAN_LEGACY_BIT
have a hard dependency.
Invalid handling of this dependency leads to disabled thermal monitoring
and temperature boundary validation.

v2: squash in typo fix (Yang)

Fixes: 9710b84e2a6a ("drm/amd/pm: add overdrive support on smu v14.0.2/3")
Cc: stable@vger.kernel.org
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yang Wang and committed by
Alex Deucher
504f0098 a7756371

+7 -3
+7 -3
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
··· 2374 2374 } 2375 2375 od_table->OverDriveTable.FanMode = FAN_MODE_AUTO; 2376 2376 od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT); 2377 + od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT); 2377 2378 break; 2378 2379 case PP_OD_EDIT_FAN_ZERO_RPM_ENABLE: 2379 2380 od_table->OverDriveTable.FanZeroRpmEnable = ··· 2403 2402 od_table->OverDriveTable.FanMinimumPwm = 2404 2403 boot_overdrive_table->OverDriveTable.FanMinimumPwm; 2405 2404 od_table->OverDriveTable.FanMode = FAN_MODE_AUTO; 2406 - od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT); 2405 + od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_LEGACY_BIT); 2406 + od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_CURVE_BIT); 2407 2407 break; 2408 2408 default: 2409 2409 dev_info(adev->dev, "Invalid table index: %ld\n", input); ··· 2574 2572 od_table->OverDriveTable.FanLinearPwmPoints[input[0]] = input[2]; 2575 2573 od_table->OverDriveTable.FanMode = FAN_MODE_MANUAL_LINEAR; 2576 2574 od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT); 2575 + od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT); 2577 2576 break; 2578 2577 2579 2578 case PP_OD_EDIT_ACOUSTIC_LIMIT: ··· 2644 2641 break; 2645 2642 2646 2643 case PP_OD_EDIT_FAN_MINIMUM_PWM: 2647 - if (!smu_v14_0_2_is_od_feature_supported(smu, PP_OD_FEATURE_FAN_CURVE_BIT)) { 2644 + if (!smu_v14_0_2_is_od_feature_supported(smu, PP_OD_FEATURE_FAN_LEGACY_BIT)) { 2648 2645 dev_warn(adev->dev, "Fan curve setting not supported!\n"); 2649 2646 return -ENOTSUPP; 2650 2647 } ··· 2662 2659 2663 2660 od_table->OverDriveTable.FanMinimumPwm = input[0]; 2664 2661 od_table->OverDriveTable.FanMode = FAN_MODE_AUTO; 2665 - od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT); 2662 + od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_LEGACY_BIT); 2663 + od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_CURVE_BIT); 2666 2664 break; 2667 2665 2668 2666 case PP_OD_EDIT_FAN_ZERO_RPM_ENABLE: