[PATCH 2/2] drm/amd/pm: add zero RPM stop temp OD setting support for SMU 14.0.2
Tomasz Pakuła
tomasz.pakula.oficjalny at gmail.com
Mon Mar 17 15:11:11 UTC 2025
On Mon, 17 Mar 2025 at 15:15, Alex Deucher <alexdeucher at gmail.com> wrote:
>
> On Mon, Mar 17, 2025 at 6:53 AM Tomasz Pakuła
> <tomasz.pakula.oficjalny at gmail.com> wrote:
> >
> > Hook up zero RPM stop temperature for 9070 and 9070 XT based on RDNA3
> > (smu 13.0.0 and 13.0.7) code.
> >
> > Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny at gmail.com>
> > ---
> > .../swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h | 3 +-
> > .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 50 ++++++++++++++++++-
> > 2 files changed, 51 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h
> > index c2fd0a4a13e5..a5eba7b91e2f 100644
> > --- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h
> > +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h
> > @@ -846,9 +846,10 @@ typedef struct {
> > uint16_t FanTargetTemperature; // Degree Celcius
> > //zero fan
> > uint8_t FanZeroRpmEnable;
> > + uint8_t FanZeroRpmStopTemp;
> > //temperature
> > uint8_t MaxOpTemp;
> > - uint8_t Padding1[2];
> > + uint8_t Padding1;
> >
> > //Full Ctrl
> > uint16_t GfxVoltageFullCtrlMode;
>
> This makes a change to the firmware interface. Presumably it works
> differently here. @Kenneth Feng or @Wang, Yang(Kevin) to confirm how
> this works with respect to the firmware.
This change in `smu14_driver_if_v14_0.h` to `OverDriveLimits_t` is based on the
`OverDriveTable_t` which already has FanZeroRpmStopTemp. It was just missing
from the limits table. I chalked it up to an omission. Here's the fan
control part of
the OverDriveTable_t:
//Fan control
uint8_t FanLinearPwmPoints[NUM_OD_FAN_MAX_POINTS];
uint8_t FanLinearTempPoints[NUM_OD_FAN_MAX_POINTS];
uint16_t FanMinimumPwm;
uint16_t AcousticTargetRpmThreshold;
uint16_t AcousticLimitRpmThreshold;
uint16_t FanTargetTemperature; // Degree Celcius
uint8_t FanZeroRpmEnable;
uint8_t FanZeroRpmStopTemp;
uint8_t FanMode;
uint8_t MaxOpTemp;
Based on my logical guess, `Padding1` which I changed from [2] to just a single
`uint8_t` is still probably in a place where `MaxOpTemp` should actually be and
`FanMode` should be added as well? Or maybe just MaxOpTemp and Padding
should be swapped? Of course, all that is just my best guess as I don't have the
firmware tables to confirm.
The only thing I can compare to is smu 13.0.0 and 13.0.7 code and they have
identical layout in their respective `OverDriveTable_t` and `OverDriveLimits_t`.
In testing on my RX 9070 XT Hellhound, I was able to get range and adjust the
Zero RPM stop temperature from `gpu_od/fan_ctrl/fan_zero_rpm_*`:
tomek at komputr /sys/class/drm/card1/device/gpu_od/fan_ctrl $ cat
fan_zero_rpm_enable
FAN_ZERO_RPM_ENABLE:
1
OD_RANGE:
ZERO_RPM_ENABLE: 0 1
tomek at komputr /sys/class/drm/card1/device/gpu_od/fan_ctrl $ cat
fan_zero_rpm_stop_temperature
FAN_ZERO_RPM_STOP_TEMPERATURE:
50
OD_RANGE:
ZERO_RPM_STOP_TEMPERATURE: 50 110
tomek at komputr /sys/class/drm/card1/device/gpu_od/fan_ctrl $ sudo tee
fan_target_temperature <<< "65"
65
tomek at komputr /sys/class/drm/card1/device/gpu_od/fan_ctrl $ sudo tee
fan_target_temperature <<< "c"
c
tomek at komputr /sys/class/drm/card1/device/gpu_od/fan_ctrl $ cat
fan_zero_rpm_stop_temperature
FAN_ZERO_RPM_STOP_TEMPERATURE:
50
OD_RANGE:
ZERO_RPM_STOP_TEMPERATURE: 50 110
tomek at komputr /sys/class/drm/card1/device/gpu_od/fan_ctrl $ sudo tee
fan_zero_rpm_stop_temperature <<< "45"
45
tee: fan_zero_rpm_stop_temperature: Invalid argument
And some dmesg info when trying to set a value that's out of range:
amdgpu 0000:0f:00.0: amdgpu: zero RPM stop temperature setting(45)
must be within [50, 110]!
Tomasz
More information about the amd-gfx
mailing list