drm/amd/powerplay: issue DC-BTC for arcturus on SMU init
Subsystems (2)
PATCH 1/2 drm/amd/powerplay: issue DC-BTC for arcturus on SMU init
Need to perform DC-BTC for arcturus on bootup.
--- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++-- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 17 ++++++++++++----- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 +++--- .../gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h | 3 +-- drivers/gpu/drm/amd/powerplay/inc/smu_types.h | 1 + drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +2 -2
@@ -1079,8 +1079,8 @@ static int smu_smc_table_hw_init(struct smu_context *smu,if (ret)return ret; -/* issue RunAfllBtc msg */ - ret =smu_run_afll_btc (smu); +/* issue Run*Btc msg */ + ret =smu_run_btc (smu);if (ret)return ret;
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +12 -5
@@ -112,8 +112,7 @@ static struct smu_11_0_cmn2aisc_mapping arcturus_message_map[SMU_MSG_MAX_COUNT]MSG_MAP (PrepareMp1ForShutdown, PPSMC_MSG_PrepareMp1ForShutdown),MSG_MAP (SoftReset, PPSMC_MSG_SoftReset),MSG_MAP (RunAfllBtc, PPSMC_MSG_RunAfllBtc), -MSG_MAP (RunGfxDcBtc, PPSMC_MSG_RunGfxDcBtc), -MSG_MAP (RunSocDcBtc, PPSMC_MSG_RunSocDcBtc), +MSG_MAP (RunDcBtc, PPSMC_MSG_RunDcBtc),MSG_MAP (DramLogSetDramAddrHigh, PPSMC_MSG_DramLogSetDramAddrHigh),MSG_MAP (DramLogSetDramAddrLow, PPSMC_MSG_DramLogSetDramAddrLow), MSG_MAP(DramLogSetDramSize, PPSMC_MSG_DramLogSetDramSize),
@@ -547,9 +546,17 @@ static int arcturus_append_powerplay_table(struct smu_context *smu)return 0 ; } -static int arcturus_run_btc_afll (struct smu_context *smu) +static int arcturus_run_btc (struct smu_context *smu) { -return smu_send_smc_msg (smu, SMU_MSG_RunAfllBtc); +int ret =0 ; + + ret =smu_send_smc_msg (smu, SMU_MSG_RunAfllBtc); +if (ret) { +pr_err ("RunAfllBtc failed!\n" ); +return ret; + } + +return smu_send_smc_msg (smu, SMU_MSG_RunDcBtc); }static int arcturus_populate_umd_state_clk (struct smu_context *smu)
@@ -2307,7 +2314,7 @@ static const struct pptable_funcs arcturus_ppt_funcs = {/* init dpm */ .get_allowed_feature_mask = arcturus_get_allowed_feature_mask,/* btc */ - .run_afll_btc = arcturus_run_btc_afll, + .run_btc = arcturus_run_btc,/* dpm/clk tables */ .set_default_dpm_table = arcturus_set_default_dpm_table, .populate_umd_state_clk = arcturus_populate_umd_state_clk,
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +3 -3
@@ -427,7 +427,7 @@ struct pptable_funcs {int (*get_smu_table_index)(struct smu_context *smu,uint32_t index);int (*get_smu_power_index)(struct smu_context *smu,uint32_t index);int (*get_workload_type)(struct smu_context *smu,enum PP_SMC_POWER_PROFILE profile); -int (*run_afll_btc)(struct smu_context *smu); +int (*run_btc)(struct smu_context *smu);int (*get_allowed_feature_mask)(struct smu_context *smu,uint32_t *feature_mask,uint32_t num);enum amd_pm_state_type (*get_current_power_state)(struct smu_context *smu);int (*set_default_dpm_table)(struct smu_context *smu);
@@ -745,8 +745,8 @@ struct smu_funcs ((smu)->ppt_funcs? ((smu)->ppt_funcs->get_smu_power_index? (smu)->ppt_funcs->get_smu_power_index((smu), (src)) : -EINVAL) : -EINVAL)#define smu_workload_get_type (smu, profile) \ ((smu)->ppt_funcs? ((smu)->ppt_funcs->get_workload_type? (smu)->ppt_funcs->get_workload_type((smu), (profile)) : -EINVAL) : -EINVAL) -#define smu_run_afll_btc (smu) \ - ((smu)->ppt_funcs? ((smu)->ppt_funcs->run_afll_btc? (smu)->ppt_funcs->run_afll_btc((smu)) : 0) : 0) +#define smu_run_btc (smu) \ + ((smu)->ppt_funcs? ((smu)->ppt_funcs->run_btc? (smu)->ppt_funcs->run_btc((smu)) : 0) : 0)#define smu_get_allowed_feature_mask (smu, feature_mask, num) \ ((smu)->ppt_funcs? ((smu)->ppt_funcs->get_allowed_feature_mask? (smu)->ppt_funcs->get_allowed_feature_mask((smu), (feature_mask), (num)) : 0) : 0)#define smu_set_deep_sleep_dcefclk (smu, clk) \
drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h +1 -2
@@ -95,8 +95,7 @@//BTC #define PPSMC_MSG_RunAfllBtc 0x30 -#define PPSMC_MSG_RunGfxDcBtc 0x31 -#define PPSMC_MSG_RunSocDcBtc 0x32 +#define PPSMC_MSG_RunDcBtc 0x31//Debug #define PPSMC_MSG_DramLogSetDramAddrHigh 0x33
drivers/gpu/drm/amd/powerplay/inc/smu_types.h +1 -0
@@ -114,6 +114,7 @@__SMU_DUMMY_MAP (PowerDownJpeg), \__SMU_DUMMY_MAP (BacoAudioD3PME), \__SMU_DUMMY_MAP (ArmD3), \ +__SMU_DUMMY_MAP (RunDcBtc), \__SMU_DUMMY_MAP (RunGfxDcBtc), \__SMU_DUMMY_MAP (RunSocDcBtc), \ __SMU_DUMMY_MAP(SetMemoryChannelEnable), \
drivers/gpu/drm/amd/powerplay/vega20_ppt.c +1 -1
@@ -3145,7 +3145,7 @@ static const struct pptable_funcs vega20_ppt_funcs = { .get_smu_table_index = vega20_get_smu_table_index, .get_smu_power_index = vega20_get_pwr_src_index, .get_workload_type = vega20_get_workload_type, - .run_afll_btc = vega20_run_btc_afll, + .run_btc = vega20_run_btc_afll, .get_allowed_feature_mask = vega20_get_allowed_feature_mask, .get_current_power_state = vega20_get_current_power_state, .set_default_dpm_table = vega20_set_default_dpm_table,
Signature · 6 lines
2.23.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 drm/amd/powerplay: update smu11_driver_if_arcturus.h
Also bump the SMU11_DRIVER_IF_VERSION_ARCT.
--- .../gpu/drm/amd/powerplay/inc/smu11_driver_if_arcturus.h | 6 +++++- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_arcturus.h +5 -1
@@ -696,7 +696,11 @@ typedef struct {uint8_t GpioI2cSda;// Serial Data uint16_t GpioPadding; -uint32_t BoardReserved[9 ]; +// Platform input telemetry voltage coefficient +uint32_t BoardVoltageCoeffA;// decode by /1000 +uint32_t BoardVoltageCoeffB;// decode by /1000 + +uint32_t BoardReserved[7 ];// Padding for MMHUB - do not modify this uint32_t MmHubPadding[8 ];// SMU internal use
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h +1 -1
@@ -27,7 +27,7 @@#define SMU11_DRIVER_IF_VERSION_INV 0xFFFFFFFF#define SMU11_DRIVER_IF_VERSION_VG20 0x13 -#define SMU11_DRIVER_IF_VERSION_ARCT 0x09 +#define SMU11_DRIVER_IF_VERSION_ARCT 0x0A#define SMU11_DRIVER_IF_VERSION_NV10 0x33#define SMU11_DRIVER_IF_VERSION_NV12 0x33#define SMU11_DRIVER_IF_VERSION_NV14 0x34
Signature · 6 lines
2.23.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Wang, Kevin(Yang)
Reviewed-byRe: [PATCH 2/2] drm/amd/powerplay: update smu11_driver_if_arcturus.h
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Quan, Evan <[email protected]>
Sent: Monday, September 9, 2019 7:33 PM
To: [email protected] <[email protected]>
Cc: Li, Candice <[email protected]>; Gui, Jack <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH 2/2] drm/amd/powerplay: update smu11_driver_if_arcturus.h
Also bump the SMU11_DRIVER_IF_VERSION_ARCT.
--- .../gpu/drm/amd/powerplay/inc/smu11_driver_if_arcturus.h | 6 +++++- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_arcturus.h +5 -1
@@ -696,7 +696,11 @@ typedef struct {uint8_t GpioI2cSda;// Serial Data uint16_t GpioPadding; -uint32_t BoardReserved[9 ]; +// Platform input telemetry voltage coefficient +uint32_t BoardVoltageCoeffA;// decode by /1000 +uint32_t BoardVoltageCoeffB;// decode by /1000 + +uint32_t BoardReserved[7 ];// Padding for MMHUB - do not modify this uint32_t MmHubPadding[8 ];// SMU internal use
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h +1 -1
@@ -27,7 +27,7 @@#define SMU11_DRIVER_IF_VERSION_INV 0xFFFFFFFF#define SMU11_DRIVER_IF_VERSION_VG20 0x13 -#define SMU11_DRIVER_IF_VERSION_ARCT 0x09 +#define SMU11_DRIVER_IF_VERSION_ARCT 0x0A#define SMU11_DRIVER_IF_VERSION_NV10 0x33#define SMU11_DRIVER_IF_VERSION_NV12 0x33#define SMU11_DRIVER_IF_VERSION_NV14 0x34
--
2.23.0
_______________________________________________
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
Wang, Kevin(Yang)
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Quan, Evan <[email protected]>
Sent: Monday, September 9, 2019 7:33 PM
To: [email protected] <[email protected]>
Cc: Li, Candice <[email protected]>; Gui, Jack <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH 1/2] drm/amd/powerplay: issue DC-BTC for arcturus on SMU init
Need to perform DC-BTC for arcturus on bootup.
--- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++-- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 17 ++++++++++++----- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 +++--- .../gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h | 3 +-- drivers/gpu/drm/amd/powerplay/inc/smu_types.h | 1 + drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +2 -2
@@ -1079,8 +1079,8 @@ static int smu_smc_table_hw_init(struct smu_context *smu,if (ret)return ret; -/* issue RunAfllBtc msg */ - ret =smu_run_afll_btc (smu); +/* issue Run*Btc msg */ + ret =smu_run_btc (smu);if (ret)return ret;
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +12 -5
@@ -112,8 +112,7 @@ static struct smu_11_0_cmn2aisc_mapping arcturus_message_map[SMU_MSG_MAX_COUNT]MSG_MAP (PrepareMp1ForShutdown, PPSMC_MSG_PrepareMp1ForShutdown),MSG_MAP (SoftReset, PPSMC_MSG_SoftReset),MSG_MAP (RunAfllBtc, PPSMC_MSG_RunAfllBtc), -MSG_MAP (RunGfxDcBtc, PPSMC_MSG_RunGfxDcBtc), -MSG_MAP (RunSocDcBtc, PPSMC_MSG_RunSocDcBtc), +MSG_MAP (RunDcBtc, PPSMC_MSG_RunDcBtc),MSG_MAP (DramLogSetDramAddrHigh, PPSMC_MSG_DramLogSetDramAddrHigh),MSG_MAP (DramLogSetDramAddrLow, PPSMC_MSG_DramLogSetDramAddrLow), MSG_MAP(DramLogSetDramSize, PPSMC_MSG_DramLogSetDramSize),
@@ -547,9 +546,17 @@ static int arcturus_append_powerplay_table(struct smu_context *smu)return 0 ; } -static int arcturus_run_btc_afll (struct smu_context *smu) +static int arcturus_run_btc (struct smu_context *smu) { -return smu_send_smc_msg (smu, SMU_MSG_RunAfllBtc); +int ret =0 ; + + ret =smu_send_smc_msg (smu, SMU_MSG_RunAfllBtc); +if (ret) { +pr_err ("RunAfllBtc failed!\n" ); +return ret; + } + +return smu_send_smc_msg (smu, SMU_MSG_RunDcBtc); }static int arcturus_populate_umd_state_clk (struct smu_context *smu)
@@ -2307,7 +2314,7 @@ static const struct pptable_funcs arcturus_ppt_funcs = {/* init dpm */ .get_allowed_feature_mask = arcturus_get_allowed_feature_mask,/* btc */ - .run_afll_btc = arcturus_run_btc_afll, + .run_btc = arcturus_run_btc,/* dpm/clk tables */ .set_default_dpm_table = arcturus_set_default_dpm_table, .populate_umd_state_clk = arcturus_populate_umd_state_clk,
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +3 -3
@@ -427,7 +427,7 @@ struct pptable_funcs {int (*get_smu_table_index)(struct smu_context *smu,uint32_t index);int (*get_smu_power_index)(struct smu_context *smu,uint32_t index);int (*get_workload_type)(struct smu_context *smu,enum PP_SMC_POWER_PROFILE profile); -int (*run_afll_btc)(struct smu_context *smu); +int (*run_btc)(struct smu_context *smu);int (*get_allowed_feature_mask)(struct smu_context *smu,uint32_t *feature_mask,uint32_t num);enum amd_pm_state_type (*get_current_power_state)(struct smu_context *smu);int (*set_default_dpm_table)(struct smu_context *smu);
@@ -745,8 +745,8 @@ struct smu_funcs ((smu)->ppt_funcs? ((smu)->ppt_funcs->get_smu_power_index? (smu)->ppt_funcs->get_smu_power_index((smu), (src)) : -EINVAL) : -EINVAL)#define smu_workload_get_type (smu, profile) \ ((smu)->ppt_funcs? ((smu)->ppt_funcs->get_workload_type? (smu)->ppt_funcs->get_workload_type((smu), (profile)) : -EINVAL) : -EINVAL) -#define smu_run_afll_btc (smu) \ - ((smu)->ppt_funcs? ((smu)->ppt_funcs->run_afll_btc? (smu)->ppt_funcs->run_afll_btc((smu)) : 0) : 0) +#define smu_run_btc (smu) \ + ((smu)->ppt_funcs? ((smu)->ppt_funcs->run_btc? (smu)->ppt_funcs->run_btc((smu)) : 0) : 0)#define smu_get_allowed_feature_mask (smu, feature_mask, num) \ ((smu)->ppt_funcs? ((smu)->ppt_funcs->get_allowed_feature_mask? (smu)->ppt_funcs->get_allowed_feature_mask((smu), (feature_mask), (num)) : 0) : 0)#define smu_set_deep_sleep_dcefclk (smu, clk) \
drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h +1 -2
@@ -95,8 +95,7 @@//BTC #define PPSMC_MSG_RunAfllBtc 0x30 -#define PPSMC_MSG_RunGfxDcBtc 0x31 -#define PPSMC_MSG_RunSocDcBtc 0x32 +#define PPSMC_MSG_RunDcBtc 0x31//Debug #define PPSMC_MSG_DramLogSetDramAddrHigh 0x33
drivers/gpu/drm/amd/powerplay/inc/smu_types.h +1 -0
@@ -114,6 +114,7 @@__SMU_DUMMY_MAP (PowerDownJpeg), \__SMU_DUMMY_MAP (BacoAudioD3PME), \__SMU_DUMMY_MAP (ArmD3), \ +__SMU_DUMMY_MAP (RunDcBtc), \__SMU_DUMMY_MAP (RunGfxDcBtc), \__SMU_DUMMY_MAP (RunSocDcBtc), \ __SMU_DUMMY_MAP(SetMemoryChannelEnable), \
drivers/gpu/drm/amd/powerplay/vega20_ppt.c +1 -1
@@ -3145,7 +3145,7 @@ static const struct pptable_funcs vega20_ppt_funcs = { .get_smu_table_index = vega20_get_smu_table_index, .get_smu_power_index = vega20_get_pwr_src_index, .get_workload_type = vega20_get_workload_type, - .run_afll_btc = vega20_run_btc_afll, + .run_btc = vega20_run_btc_afll, .get_allowed_feature_mask = vega20_get_allowed_feature_mask, .get_current_power_state = vega20_get_current_power_state, .set_default_dpm_table = vega20_set_default_dpm_table,
--
2.23.0
_______________________________________________
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