drm/amd/powerplay: revise the way to retrieve the board parameters
Subsystems (2)
PATCH 1/2 drm/amd/powerplay: revise the way to retrieve the board parameters
It can support different NV1x ASIC better. And this can guard no member got missing.
--- drivers/gpu/drm/amd/include/atomfirmware.h | 102 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 99 ++++++-------------- 2 files changed, 130 insertions(+), 71 deletions(-)
drivers/gpu/drm/amd/include/atomfirmware.h +102 -0
@@ -1876,6 +1876,108 @@ struct atom_smc_dpm_info_v4_6uint32_t boardreserved[10 ]; }; +struct atom_smc_dpm_info_v4_7 +{ +struct atom_common_table_header table_header; +// SECTION: BOARD PARAMETERS +// I2C Control +struct smudpm_i2c_controller_config_v2 I2cControllers[8 ]; + +// SVI2 Board Parameters +uint16_t MaxVoltageStepGfx;// In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value. +uint16_t MaxVoltageStepSoc;// In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value. + +uint8_t VddGfxVrMapping;// Use VR_MAPPING* bitfields +uint8_t VddSocVrMapping;// Use VR_MAPPING* bitfields +uint8_t VddMem0VrMapping;// Use VR_MAPPING* bitfields +uint8_t VddMem1VrMapping;// Use VR_MAPPING* bitfields + +uint8_t GfxUlvPhaseSheddingMask;// set this to 1 to set PSI0/1 to 1 in ULV mode +uint8_t SocUlvPhaseSheddingMask;// set this to 1 to set PSI0/1 to 1 in ULV mode +uint8_t ExternalSensorPresent;// External RDI connected to TMON (aka TEMP IN) +uint8_t Padding8_V; + +// Telemetry Settings +uint16_t GfxMaxCurrent;// in Amps +uint8_t GfxOffset;// in Amps +uint8_t Padding_TelemetryGfx; +uint16_t SocMaxCurrent;// in Amps +uint8_t SocOffset;// in Amps +uint8_t Padding_TelemetrySoc; + +uint16_t Mem0MaxCurrent;// in Amps +uint8_t Mem0Offset;// in Amps +uint8_t Padding_TelemetryMem0; + +uint16_t Mem1MaxCurrent;// in Amps +uint8_t Mem1Offset;// in Amps +uint8_t Padding_TelemetryMem1; + +// GPIO Settings +uint8_t AcDcGpio;// GPIO pin configured for AC/DC switching +uint8_t AcDcPolarity;// GPIO polarity for AC/DC switching +uint8_t VR0HotGpio;// GPIO pin configured for VR0 HOT event +uint8_t VR0HotPolarity;// GPIO polarity for VR0 HOT event + +uint8_t VR1HotGpio;// GPIO pin configured for VR1 HOT event +uint8_t VR1HotPolarity;// GPIO polarity for VR1 HOT event +uint8_t GthrGpio;// GPIO pin configured for GTHR Event +uint8_t GthrPolarity;// replace GPIO polarity for GTHR + +// LED Display Settings +uint8_t LedPin0;// GPIO number for LedPin[0] +uint8_t LedPin1;// GPIO number for LedPin[1] +uint8_t LedPin2;// GPIO number for LedPin[2] +uint8_t padding8_4; + +// GFXCLK PLL Spread Spectrum +uint8_t PllGfxclkSpreadEnabled;// on or off +uint8_t PllGfxclkSpreadPercent;// Q4.4 +uint16_t PllGfxclkSpreadFreq;// kHz + +// GFXCLK DFLL Spread Spectrum +uint8_t DfllGfxclkSpreadEnabled;// on or off +uint8_t DfllGfxclkSpreadPercent;// Q4.4 +uint16_t DfllGfxclkSpreadFreq;// kHz + +// UCLK Spread Spectrum +uint8_t UclkSpreadEnabled;// on or off +uint8_t UclkSpreadPercent;// Q4.4 +uint16_t UclkSpreadFreq;// kHz + +// SOCCLK Spread Spectrum +uint8_t SoclkSpreadEnabled;// on or off +uint8_t SocclkSpreadPercent;// Q4.4 +uint16_t SocclkSpreadFreq;// kHz + +// Total board power +uint16_t TotalBoardPower;//Only needed for TCP Estimated case, where TCP = TGP+Total Board Power +uint16_t BoardPadding; + +// Mvdd Svi2 Div Ratio Setting +uint32_t MvddRatio;// This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16) + +// GPIO pins for I2C communications with 2nd controller for Input Telemetry Sequence +uint8_t GpioI2cScl;// Serial Clock +uint8_t GpioI2cSda;// Serial Data +uint16_t GpioPadding; + +// Additional LED Display Settings +uint8_t LedPin3;// GPIO number for LedPin[3] - PCIE GEN Speed +uint8_t LedPin4;// GPIO number for LedPin[4] - PMFW Error Status +uint16_t LedEnableMask; + +// Power Limit Scalars +uint8_t PowerLimitScalar[4 ];//[PPT_THROTTLER_COUNT] + +uint8_t MvddUlvPhaseSheddingMask; +uint8_t VddciUlvPhaseSheddingMask; +uint8_t Padding8_Psi1; +uint8_t Padding8_Psi2; + +uint32_t BoardReserved[5 ]; +}; +/* *************************************************************************** Data Table asic_profiling_info structure
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +28 -71
111 lines not on this page · raw message
Signature · 6 lines
2.26.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 drm/amd/powerplay: bump the NAVI10 smu-driver if version
To fit the latest SMC firmware 42.53 and eliminate the warning on driver loading.
--- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h +1 -1
@@ -28,7 +28,7 @@#define SMU11_DRIVER_IF_VERSION_INV 0xFFFFFFFF#define SMU11_DRIVER_IF_VERSION_VG20 0x13#define SMU11_DRIVER_IF_VERSION_ARCT 0x12 -#define SMU11_DRIVER_IF_VERSION_NV10 0x35 +#define SMU11_DRIVER_IF_VERSION_NV10 0x36#define SMU11_DRIVER_IF_VERSION_NV12 0x33#define SMU11_DRIVER_IF_VERSION_NV14 0x36
Signature · 6 lines
2.26.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 2/2] drm/amd/powerplay: bump the NAVI10 smu-driver if version
Quoted 6 lines · Evan Quan
To fit the latest SMC firmware 42.53 and eliminate the warning on driver loading.
Change-Id I3f524d03e53ec6778b7118ef72652a538eec4aceSigned-off-by Evan Quan <[email protected]>
Series is:
Quoted 20 lines
--- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h +1
-2@@ -28,7 +28,7 @@#define SMU11_DRIVER_IF_VERSION_INV 0xFFFFFFFF#define SMU11_DRIVER_IF_VERSION_VG20 0x13#define SMU11_DRIVER_IF_VERSION_ARCT 0x12 -#define SMU11_DRIVER_IF_VERSION_NV10 0x35 +#define SMU11_DRIVER_IF_VERSION_NV10 0x36#define SMU11_DRIVER_IF_VERSION_NV12 0x33#define SMU11_DRIVER_IF_VERSION_NV14 0x36 --2.26.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/2] drm/amd/powerplay: bump the NAVI10 smu-driver if version
In reply to Evan Quan[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Monday, April 13, 2020 4:54 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Feng, Kenneth <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH 2/2] drm/amd/powerplay: bump the NAVI10 smu-driver if version
To fit the latest SMC firmware 42.53 and eliminate the warning on driver loading.
--- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h +1 -1
@@ -28,7 +28,7 @@#define SMU11_DRIVER_IF_VERSION_INV 0xFFFFFFFF #define SMU11_DRIVER_IF_VERSION_VG20 0x13 #define SMU11_DRIVER_IF_VERSION_ARCT 0x12 -#define SMU11_DRIVER_IF_VERSION_NV10 0x35 +#define SMU11_DRIVER_IF_VERSION_NV10 0x36#define SMU11_DRIVER_IF_VERSION_NV12 0x33 #define SMU11_DRIVER_IF_VERSION_NV14 0x36 --
2.26.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Monday, April 13, 2020 4:54 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Feng, Kenneth <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH 1/2] drm/amd/powerplay: revise the way to retrieve the board parameters
It can support different NV1x ASIC better. And this can guard no member got missing.
--- drivers/gpu/drm/amd/include/atomfirmware.h | 102 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 99 ++++++-------------- 2 files changed, 130 insertions(+), 71 deletions(-)
drivers/gpu/drm/amd/include/atomfirmware.h +102 -0
@@ -1876,6 +1876,108 @@ struct atom_smc_dpm_info_v4_6uint32_t boardreserved[10 ]; }; +struct atom_smc_dpm_info_v4_7 +{ +struct atom_common_table_header table_header; +// SECTION: BOARD PARAMETERS +// I2C Control +struct smudpm_i2c_controller_config_v2 I2cControllers[8 ]; + +// SVI2 Board Parameters +uint16_t MaxVoltageStepGfx;// In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value. +uint16_t MaxVoltageStepSoc;// In mV(Q2) Max voltage step that SMU will request. Multiple steps are taken if voltage change exceeds this value. + +uint8_t VddGfxVrMapping;// Use VR_MAPPING* bitfields +uint8_t VddSocVrMapping;// Use VR_MAPPING* bitfields +uint8_t VddMem0VrMapping;// Use VR_MAPPING* bitfields +uint8_t VddMem1VrMapping;// Use VR_MAPPING* bitfields + +uint8_t GfxUlvPhaseSheddingMask;// set this to 1 to set PSI0/1 to 1 in ULV mode +uint8_t SocUlvPhaseSheddingMask;// set this to 1 to set PSI0/1 to 1 in ULV mode +uint8_t ExternalSensorPresent;// External RDI connected to TMON (aka TEMP IN) +uint8_t Padding8_V; + +// Telemetry Settings +uint16_t GfxMaxCurrent;// in Amps +uint8_t GfxOffset;// in Amps +uint8_t Padding_TelemetryGfx; +uint16_t SocMaxCurrent;// in Amps +uint8_t SocOffset;// in Amps +uint8_t Padding_TelemetrySoc; + +uint16_t Mem0MaxCurrent;// in Amps +uint8_t Mem0Offset;// in Amps +uint8_t Padding_TelemetryMem0; + +uint16_t Mem1MaxCurrent;// in Amps +uint8_t Mem1Offset;// in Amps +uint8_t Padding_TelemetryMem1; + +// GPIO Settings +uint8_t AcDcGpio;// GPIO pin configured for AC/DC switching +uint8_t AcDcPolarity;// GPIO polarity for AC/DC switching +uint8_t VR0HotGpio;// GPIO pin configured for VR0 HOT event +uint8_t VR0HotPolarity;// GPIO polarity for VR0 HOT event + +uint8_t VR1HotGpio;// GPIO pin configured for VR1 HOT event +uint8_t VR1HotPolarity;// GPIO polarity for VR1 HOT event +uint8_t GthrGpio;// GPIO pin configured for GTHR Event +uint8_t GthrPolarity;// replace GPIO polarity for GTHR + +// LED Display Settings +uint8_t LedPin0;// GPIO number for LedPin[0] +uint8_t LedPin1;// GPIO number for LedPin[1] +uint8_t LedPin2;// GPIO number for LedPin[2] +uint8_t padding8_4; + +// GFXCLK PLL Spread Spectrum +uint8_t PllGfxclkSpreadEnabled;// on or off +uint8_t PllGfxclkSpreadPercent;// Q4.4 +uint16_t PllGfxclkSpreadFreq;// kHz + +// GFXCLK DFLL Spread Spectrum +uint8_t DfllGfxclkSpreadEnabled;// on or off +uint8_t DfllGfxclkSpreadPercent;// Q4.4 +uint16_t DfllGfxclkSpreadFreq;// kHz + +// UCLK Spread Spectrum +uint8_t UclkSpreadEnabled;// on or off +uint8_t UclkSpreadPercent;// Q4.4 +uint16_t UclkSpreadFreq;// kHz + +// SOCCLK Spread Spectrum +uint8_t SoclkSpreadEnabled;// on or off +uint8_t SocclkSpreadPercent;// Q4.4 +uint16_t SocclkSpreadFreq;// kHz + +// Total board power +uint16_t TotalBoardPower;//Only needed for TCP Estimated case, where TCP = TGP+Total Board Power +uint16_t BoardPadding; + +// Mvdd Svi2 Div Ratio Setting +uint32_t MvddRatio;// This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16) + +// GPIO pins for I2C communications with 2nd controller for Input Telemetry Sequence +uint8_t GpioI2cScl;// Serial Clock +uint8_t GpioI2cSda;// Serial Data +uint16_t GpioPadding; + +// Additional LED Display Settings +uint8_t LedPin3;// GPIO number for LedPin[3] - PCIE GEN Speed +uint8_t LedPin4;// GPIO number for LedPin[4] - PMFW Error Status +uint16_t LedEnableMask; + +// Power Limit Scalars +uint8_t PowerLimitScalar[4 ];//[PPT_THROTTLER_COUNT] + +uint8_t MvddUlvPhaseSheddingMask; +uint8_t VddciUlvPhaseSheddingMask; +uint8_t Padding8_Psi1; +uint8_t Padding8_Psi2; + +uint32_t BoardReserved[5 ]; +}; +/* *************************************************************************** Data Table asic_profiling_info structure diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 15030284b444..c94270f7c198 100644
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +28 -71
111 lines not on this page · raw message
--
2.26.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx