drm/amd/powerplay: update Arcturus smc fw and driver interface header
Subsystems (2)
PATCH 1/4 drm/amd/powerplay: update Arcturus smc fw and driver interface header
Update smc fw and driver interface header.
--- .../powerplay/inc/smu11_driver_if_arcturus.h | 17 +++++++++++------ drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_arcturus.h +11 -6
@@ -27,7 +27,7 @@// *** IMPORTANT *** // SMU TEAM: Always increment the interface version if // any structure is changed in this file -//#define SMU11_DRIVER_IF_VERSION 0x08 +//#define SMU11_DRIVER_IF_VERSION 0x09 #define PPTABLE_ARCTURUS_SMU_VERSION 4
@@ -691,7 +691,12 @@ typedef struct {uint16_t XgmiFclkFreq [NUM_XGMI_PSTATE_LEVELS ];uint16_t XgmiSocVoltage [NUM_XGMI_PSTATE_LEVELS ]; -uint32_t BoardReserved[10 ]; +// 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; + +uint32_t BoardReserved[9 ];// Padding for MMHUB - do not modify this uint32_t MmHubPadding[8 ];// SMU internal use
@@ -738,7 +743,7 @@ typedef struct {uint32_t Padding[4 ];// Padding - ignore -uint32_t MmHubPadding[7 ];// SMU internal use +uint32_t MmHubPadding[8 ];// SMU internal use } SmuMetrics_t;
@@ -748,7 +753,7 @@ typedef struct {float avgPsmVoltage[75 ];float minPsmVoltage[75 ]; -uint32_t MmHubPadding[3 ];// SMU internal use +uint32_t MmHubPadding[8 ];// SMU internal use } AvfsDebugTable_t; typedef struct {
@@ -797,9 +802,9 @@ typedef struct {uint32_t P2VCharzFreq[AVFS_VOLTAGE_COUNT ];// in 10KHz units -uint32_t EnabledAvfsModules; +uint32_t EnabledAvfsModules[2 ]; -uint32_t MmHubPadding[7 ];// SMU internal use +uint32_t MmHubPadding[8 ];// SMU internal use } AvfsFuseOverride_t;/* NOT CURRENTLY USED
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 0x08 +#define SMU11_DRIVER_IF_VERSION_ARCT 0x09#define SMU11_DRIVER_IF_VERSION_NV10 0x33#define SMU11_DRIVER_IF_VERSION_NV12 0x33#define SMU11_DRIVER_IF_VERSION_NV14 0x33
Signature · 6 lines
2.22.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/4 drm/amd/powerplay: expose supported clock domains only through sysfs
Do not expose those unsupported clock domains through sysfs on Arcturus.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +16 -10
@@ -2879,10 +2879,12 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)DRM_ERROR ("failed to create device file pp_dpm_socclk\n" );return ret; } - ret =device_create_file (adev->dev, &dev_attr_pp_dpm_dcefclk); -if (ret) { -DRM_ERROR ("failed to create device file pp_dpm_dcefclk\n" ); -return ret; +if (adev->asic_type !=CHIP_ARCTURUS ) { + ret =device_create_file (adev->dev, &dev_attr_pp_dpm_dcefclk); +if (ret) { +DRM_ERROR ("failed to create device file pp_dpm_dcefclk\n" ); +return ret; + } } }if (adev->asic_type >=CHIP_VEGA20 ) {
@@ -2892,10 +2894,12 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)return ret; } } - ret =device_create_file (adev->dev, &dev_attr_pp_dpm_pcie); -if (ret) { -DRM_ERROR ("failed to create device file pp_dpm_pcie\n" ); -return ret; +if (adev->asic_type !=CHIP_ARCTURUS ) { + ret =device_create_file (adev->dev, &dev_attr_pp_dpm_pcie); +if (ret) { +DRM_ERROR ("failed to create device file pp_dpm_pcie\n" ); +return ret; + } } ret =device_create_file (adev->dev, &dev_attr_pp_sclk_od);if (ret) {
@@ -2999,9 +3003,11 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev)device_remove_file (adev->dev, &dev_attr_pp_dpm_mclk);if (adev->asic_type >=CHIP_VEGA10 ) {device_remove_file (adev->dev, &dev_attr_pp_dpm_socclk); -device_remove_file (adev->dev, &dev_attr_pp_dpm_dcefclk); +if (adev->asic_type !=CHIP_ARCTURUS ) +device_remove_file (adev->dev, &dev_attr_pp_dpm_dcefclk); } -device_remove_file (adev->dev, &dev_attr_pp_dpm_pcie); +if (adev->asic_type !=CHIP_ARCTURUS ) +device_remove_file (adev->dev, &dev_attr_pp_dpm_pcie);if (adev->asic_type >=CHIP_VEGA20 )device_remove_file (adev->dev, &dev_attr_pp_dpm_fclk);device_remove_file (adev->dev, &dev_attr_pp_sclk_od);
Signature · 6 lines
2.22.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): MN2PR12MB329617CB0EF329673FB44F77A2AF0@MN2PR12MB3296.namprd12.prod.outlook.com
A message that is not in the archive (sent off-list or not yet received): MN2PR12MB329617CB0EF329673FB44F77A2AF0-rweVpJHSKTqAm9ToKNQgFgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
RE: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs
Bascially, we should not expose the sysfs interface for those features not supported by the ASIC. As, there are some tools/tests which judges whether the feature is supported by the existence of the file. This can fix some test failure in rocm test suit.
Regards,
Evan
From: Wang, Kevin(Yang) <[email protected]>
Sent: Friday, August 16, 2019 3:16 PM
To: Quan, Evan <[email protected]>; [email protected]
Subject: Re: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs
I don't recommend it. What's the problem if we keep it the way it is?
maybe other asic also has same problems, if do it, the other asic should add a condition in there too.
eg: navi10 don't support sensor of "pp_dpm_pcie".
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:[email protected]>> on behalf of Evan Quan <[email protected]<mailto:[email protected]>>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Quan, Evan <[email protected]<mailto:[email protected]>>
Subject: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs
Do not expose those unsupported clock domains through sysfs on Arcturus.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +16 -10
@@ -2879,10 +2879,12 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)DRM_ERROR ("failed to create device file pp_dpm_socclk\n" );return ret; } - ret =device_create_file (adev->dev, &dev_attr_pp_dpm_dcefclk); -if (ret) { -DRM_ERROR ("failed to create device file pp_dpm_dcefclk\n" ); -return ret; +if (adev->asic_type !=CHIP_ARCTURUS ) { + ret =device_create_file (adev->dev, &dev_attr_pp_dpm_dcefclk); +if (ret) { +DRM_ERROR ("failed to create device file pp_dpm_dcefclk\n" ); +return ret; + } } }if (adev->asic_type >=CHIP_VEGA20 ) {
@@ -2892,10 +2894,12 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)return ret; } } - ret =device_create_file (adev->dev, &dev_attr_pp_dpm_pcie); -if (ret) { -DRM_ERROR ("failed to create device file pp_dpm_pcie\n" ); -return ret; +if (adev->asic_type !=CHIP_ARCTURUS ) { + ret =device_create_file (adev->dev, &dev_attr_pp_dpm_pcie); +if (ret) { +DRM_ERROR ("failed to create device file pp_dpm_pcie\n" ); +return ret; + } } ret =device_create_file (adev->dev, &dev_attr_pp_sclk_od);if (ret) {
@@ -2999,9 +3003,11 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev)device_remove_file (adev->dev, &dev_attr_pp_dpm_mclk);if (adev->asic_type >=CHIP_VEGA10 ) {device_remove_file (adev->dev, &dev_attr_pp_dpm_socclk); -device_remove_file (adev->dev, &dev_attr_pp_dpm_dcefclk); +if (adev->asic_type !=CHIP_ARCTURUS ) +device_remove_file (adev->dev, &dev_attr_pp_dpm_dcefclk); } -device_remove_file (adev->dev, &dev_attr_pp_dpm_pcie); +if (adev->asic_type !=CHIP_ARCTURUS ) +device_remove_file (adev->dev, &dev_attr_pp_dpm_pcie);if (adev->asic_type >=CHIP_VEGA20 )device_remove_file (adev->dev, &dev_attr_pp_dpm_fclk);device_remove_file (adev->dev, &dev_attr_pp_sclk_od);
--
2.22.0
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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): MN2PR12MB3344559C0257D2BB3DB68832E4AF0-rweVpJHSKToDMgCC8P//[email protected]
Kevin Wang
Reviewed-byRe: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs
sure, i know, I feel this is not a good way to do code when other asics have similar problems. we'd better add a helper function to check which sysfs interface is supported for each asic. or move these sysfs interface to asic file to create.
anyway, we can optimize this logic later.
Best Regards,
Kevin
On 8/16/19 3:52 PM, Quan, Evan wrote:
Bascially, we should not expose the sysfs interface for those features not supported by the ASIC. As, there are some tools/tests which judges whether the feature is supported by the existence of the file. This can fix some test failure in rocm test suit.
Regards,
Evan
From: Wang, Kevin(Yang) <[email protected]><mailto:[email protected]>
Sent: Friday, August 16, 2019 3:16 PM
To: Quan, Evan <[email protected]><mailto:[email protected]>; [email protected]<mailto:[email protected]>
Subject: Re: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs
I don't recommend it. What's the problem if we keep it the way it is?
maybe other asic also has same problems, if do it, the other asic should add a condition in there too.
eg: navi10 don't support sensor of "pp_dpm_pcie".
Best Regards,
Kevin
________________________________
From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Evan Quan <[email protected]<mailto:[email protected]>>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Quan, Evan <[email protected]<mailto:[email protected]>>
Subject: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs
Do not expose those unsupported clock domains through sysfs on Arcturus.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +16 -10
@@ -2879,10 +2879,12 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)DRM_ERROR ("failed to create device file pp_dpm_socclk\n" );return ret; } - ret =device_create_file (adev->dev, &dev_attr_pp_dpm_dcefclk); -if (ret) { -DRM_ERROR ("failed to create device file pp_dpm_dcefclk\n" ); -return ret; +if (adev->asic_type !=CHIP_ARCTURUS ) { + ret =device_create_file (adev->dev, &dev_attr_pp_dpm_dcefclk); +if (ret) { +DRM_ERROR ("failed to create device file pp_dpm_dcefclk\n" ); +return ret; + } } }if (adev->asic_type >=CHIP_VEGA20 ) {
@@ -2892,10 +2894,12 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)return ret; } } - ret =device_create_file (adev->dev, &dev_attr_pp_dpm_pcie); -if (ret) { -DRM_ERROR ("failed to create device file pp_dpm_pcie\n" ); -return ret; +if (adev->asic_type !=CHIP_ARCTURUS ) { + ret =device_create_file (adev->dev, &dev_attr_pp_dpm_pcie); +if (ret) { +DRM_ERROR ("failed to create device file pp_dpm_pcie\n" ); +return ret; + } } ret =device_create_file (adev->dev, &dev_attr_pp_sclk_od);if (ret) {
@@ -2999,9 +3003,11 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev)device_remove_file (adev->dev, &dev_attr_pp_dpm_mclk);if (adev->asic_type >=CHIP_VEGA10 ) {device_remove_file (adev->dev, &dev_attr_pp_dpm_socclk); -device_remove_file (adev->dev, &dev_attr_pp_dpm_dcefclk); +if (adev->asic_type !=CHIP_ARCTURUS ) +device_remove_file (adev->dev, &dev_attr_pp_dpm_dcefclk); } -device_remove_file (adev->dev, &dev_attr_pp_dpm_pcie); +if (adev->asic_type !=CHIP_ARCTURUS ) +device_remove_file (adev->dev, &dev_attr_pp_dpm_pcie);if (adev->asic_type >=CHIP_VEGA20 )device_remove_file (adev->dev, &dev_attr_pp_dpm_fclk);device_remove_file (adev->dev, &dev_attr_pp_sclk_od);
--
2.22.0
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 drm/amd/powerplay: get bootup fclk value
In reply to a message not in the archiveThis is available with firmwareinfo table v3.2 or later.
--- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +3 -0
@@ -222,6 +222,9 @@ struct smu_bios_boot_up_valuesuint16_t vdd_gfx;uint8_t cooling_id;uint32_t pp_table_id; +uint32_t format_revision; +uint32_t content_revision; +uint32_t fclk; };enum smu_table_id
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +21 -0
@@ -568,6 +568,9 @@ int smu_v11_0_get_vbios_bootup_values(struct smu_context *smu) smu->smu_table.boot_values.pp_table_id = v_3_3->pplib_pptable_id; } + smu->smu_table.boot_values.format_revision = header->format_revision; + smu->smu_table.boot_values.content_revision = header->content_revision; +return 0 ; }
@@ -647,6 +650,24 @@ static int smu_v11_0_get_clk_info_from_vbios(struct smu_context *smu) output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; smu->smu_table.boot_values.dclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; +if ((smu->smu_table.boot_values.format_revision ==3 ) && + (smu->smu_table.boot_values.content_revision >=2 )) { +memset (&input,0 ,sizeof (input)); + input.clk_id =SMU11_SYSPLL1_0_FCLK_ID ; + input.syspll_id =SMU11_SYSPLL1_2_ID ; + input.command =GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ ; + index =get_index_into_master_table (atom_master_list_of_command_functions_v2_1, + getsmuclockinfo); + + ret =amdgpu_atom_execute_table (adev->mode_info.atom_context, index, + (uint32_t *)&input); +if (ret) +return -EINVAL ; + + output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; + smu->smu_table.boot_values.fclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; + } +return 0 ; }
Signature · 6 lines
2.22.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]
Re: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
i think we can use a function to retrieve this information without storing it separately.
likes: ret = smu_get_atom_data_table(smu, index, &size, &frev, &crev,
(uint8_t **)&header);
because these information is a generic information from atom_common_table_header. and other function don't care it except in smu_v11_0_get_clk_info_from_vbios.
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Evan Quan <[email protected]>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected] <[email protected]>
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
This is available with firmwareinfo table v3.2 or later.
--- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +3 -0
@@ -222,6 +222,9 @@ struct smu_bios_boot_up_valuesuint16_t vdd_gfx;uint8_t cooling_id;uint32_t pp_table_id; +uint32_t format_revision; +uint32_t content_revision; +uint32_t fclk; };enum smu_table_id
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +21 -0
@@ -568,6 +568,9 @@ int smu_v11_0_get_vbios_bootup_values(struct smu_context *smu) smu->smu_table.boot_values.pp_table_id = v_3_3->pplib_pptable_id; } + smu->smu_table.boot_values.format_revision = header->format_revision; + smu->smu_table.boot_values.content_revision = header->content_revision; +return 0 ; }
@@ -647,6 +650,24 @@ static int smu_v11_0_get_clk_info_from_vbios(struct smu_context *smu) output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; smu->smu_table.boot_values.dclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; +if ((smu->smu_table.boot_values.format_revision ==3 ) && + (smu->smu_table.boot_values.content_revision >=2 )) { +memset (&input,0 ,sizeof (input)); + input.clk_id =SMU11_SYSPLL1_0_FCLK_ID ; + input.syspll_id =SMU11_SYSPLL1_2_ID ; + input.command =GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ ; + index =get_index_into_master_table (atom_master_list_of_command_functions_v2_1, + getsmuclockinfo); + + ret =amdgpu_atom_execute_table (adev->mode_info.atom_context, index, + (uint32_t *)&input); +if (ret) +return -EINVAL ; + + output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; + smu->smu_table.boot_values.fclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; + } +return 0 ; }
--
2.22.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
A message that is not in the archive (sent off-list or not yet received): MN2PR12MB3296E1EFA5B50EBA18CE1841A2AF0-rweVpJHSKTqAm9ToKNQgFgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
RE: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
Since smu_get_atom_data_table() was already used in smu_v11_0_get_vbios_bootup_values(). We should get all our needed information at once. Also, what smu_get_atom_data_table() does is to get the data table from vbios. It's a time and resource cost job.
I do not think it's a good idea to call it again just to get some information we should already know.
Regards,
Evan
From: Wang, Kevin(Yang) <[email protected]>
Sent: Friday, August 16, 2019 3:10 PM
To: Quan, Evan <[email protected]>; [email protected]
Subject: Re: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
i think we can use a function to retrieve this information without storing it separately.
likes: ret = smu_get_atom_data_table(smu, index, &size, &frev, &crev,
(uint8_t **)&header);
because these information is a generic information from atom_common_table_header. and other function don't care it except in smu_v11_0_get_clk_info_from_vbios.
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:[email protected]>> on behalf of Evan Quan <[email protected]<mailto:[email protected]>>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Quan, Evan <[email protected]<mailto:[email protected]>>
Subject: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
This is available with firmwareinfo table v3.2 or later.
--- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +3 -0
@@ -222,6 +222,9 @@ struct smu_bios_boot_up_valuesuint16_t vdd_gfx;uint8_t cooling_id;uint32_t pp_table_id; +uint32_t format_revision; +uint32_t content_revision; +uint32_t fclk; };enum smu_table_id
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +21 -0
@@ -568,6 +568,9 @@ int smu_v11_0_get_vbios_bootup_values(struct smu_context *smu) smu->smu_table.boot_values.pp_table_id = v_3_3->pplib_pptable_id; } + smu->smu_table.boot_values.format_revision = header->format_revision; + smu->smu_table.boot_values.content_revision = header->content_revision; +return 0 ; }
@@ -647,6 +650,24 @@ static int smu_v11_0_get_clk_info_from_vbios(struct smu_context *smu) output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; smu->smu_table.boot_values.dclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; +if ((smu->smu_table.boot_values.format_revision ==3 ) && + (smu->smu_table.boot_values.content_revision >=2 )) { +memset (&input,0 ,sizeof (input)); + input.clk_id =SMU11_SYSPLL1_0_FCLK_ID ; + input.syspll_id =SMU11_SYSPLL1_2_ID ; + input.command =GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ ; + index =get_index_into_master_table (atom_master_list_of_command_functions_v2_1, + getsmuclockinfo); + + ret =amdgpu_atom_execute_table (adev->mode_info.atom_context, index, + (uint32_t *)&input); +if (ret) +return -EINVAL ; + + output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; + smu->smu_table.boot_values.fclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; + } +return 0 ; }
--
2.22.0
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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): MN2PR12MB3344896B119B12D504E130C8E4AF0-rweVpJHSKToDMgCC8P//[email protected]
RE: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
Ping..
From: Quan, Evan
Sent: Friday, August 16, 2019 4:00 PM
To: Wang, Kevin(Yang) <[email protected]>; [email protected]
Subject: RE: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
Since smu_get_atom_data_table() was already used in smu_v11_0_get_vbios_bootup_values(). We should get all our needed information at once. Also, what smu_get_atom_data_table() does is to get the data table from vbios. It's a time and resource cost job.
I do not think it's a good idea to call it again just to get some information we should already know.
Regards,
Evan
From: Wang, Kevin(Yang) <[email protected]<mailto:[email protected]>>
Sent: Friday, August 16, 2019 3:10 PM
To: Quan, Evan <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>
Subject: Re: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
i think we can use a function to retrieve this information without storing it separately.
likes: ret = smu_get_atom_data_table(smu, index, &size, &frev, &crev,
(uint8_t **)&header);
because these information is a generic information from atom_common_table_header. and other function don't care it except in smu_v11_0_get_clk_info_from_vbios.
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:[email protected]>> on behalf of Evan Quan <[email protected]<mailto:[email protected]>>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Quan, Evan <[email protected]<mailto:[email protected]>>
Subject: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
This is available with firmwareinfo table v3.2 or later.
--- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +3 -0
@@ -222,6 +222,9 @@ struct smu_bios_boot_up_valuesuint16_t vdd_gfx;uint8_t cooling_id;uint32_t pp_table_id; +uint32_t format_revision; +uint32_t content_revision; +uint32_t fclk; };enum smu_table_id
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +21 -0
@@ -568,6 +568,9 @@ int smu_v11_0_get_vbios_bootup_values(struct smu_context *smu) smu->smu_table.boot_values.pp_table_id = v_3_3->pplib_pptable_id; } + smu->smu_table.boot_values.format_revision = header->format_revision; + smu->smu_table.boot_values.content_revision = header->content_revision; +return 0 ; }
@@ -647,6 +650,24 @@ static int smu_v11_0_get_clk_info_from_vbios(struct smu_context *smu) output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; smu->smu_table.boot_values.dclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; +if ((smu->smu_table.boot_values.format_revision ==3 ) && + (smu->smu_table.boot_values.content_revision >=2 )) { +memset (&input,0 ,sizeof (input)); + input.clk_id =SMU11_SYSPLL1_0_FCLK_ID ; + input.syspll_id =SMU11_SYSPLL1_2_ID ; + input.command =GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ ; + index =get_index_into_master_table (atom_master_list_of_command_functions_v2_1, + getsmuclockinfo); + + ret =amdgpu_atom_execute_table (adev->mode_info.atom_context, index, + (uint32_t *)&input); +if (ret) +return -EINVAL ; + + output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; + smu->smu_table.boot_values.fclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; + } +return 0 ; }
--
2.22.0
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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): MN2PR12MB33443B0D70F900195F611CD5E4AB0-rweVpJHSKToDMgCC8P//[email protected]
Wang, Kevin(Yang)
Reviewed-byRe: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
Best Regards,
Kevin
________________________________
From: Quan, Evan <[email protected]>
Sent: Tuesday, August 20, 2019 10:09 AM
To: [email protected] <[email protected]>
Cc: Wang, Kevin(Yang) <[email protected]>
Subject: RE: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
Ping..
From: Quan, Evan
Sent: Friday, August 16, 2019 4:00 PM
To: Wang, Kevin(Yang) <[email protected]>; [email protected]
Subject: RE: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
Since smu_get_atom_data_table() was already used in smu_v11_0_get_vbios_bootup_values(). We should get all our needed information at once.
Also, what smu_get_atom_data_table() does is to get the data table from vbios. It’s a time and resource cost job.
I do not think it’s a good idea to call it again just to get some information we should already know.
Regards,
Evan
From: Wang, Kevin(Yang) <[email protected]<mailto:[email protected]>>
Sent: Friday, August 16, 2019 3:10 PM
To: Quan, Evan <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>
Subject: Re: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
i think we can use a function to retrieve this information without storing it separately.
likes: ret = smu_get_atom_data_table(smu, index, &size, &frev, &crev,
(uint8_t **)&header);
because these information is a generic information from atom_common_table_header.
and other function don't care it except in smu_v11_0_get_clk_info_from_vbios.
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:[email protected]>> on behalf of Evan Quan <[email protected]<mailto:[email protected]>>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Quan, Evan <[email protected]<mailto:[email protected]>>
Subject: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value
This is available with firmwareinfo table v3.2 or later.
--- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +3 -0
@@ -222,6 +222,9 @@ struct smu_bios_boot_up_valuesuint16_t vdd_gfx;uint8_t cooling_id;uint32_t pp_table_id; +uint32_t format_revision; +uint32_t content_revision; +uint32_t fclk; };enum smu_table_id
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +21 -0
@@ -568,6 +568,9 @@ int smu_v11_0_get_vbios_bootup_values(struct smu_context *smu) smu->smu_table.boot_values.pp_table_id = v_3_3->pplib_pptable_id; } + smu->smu_table.boot_values.format_revision = header->format_revision; + smu->smu_table.boot_values.content_revision = header->content_revision; +return 0 ; }
@@ -647,6 +650,24 @@ static int smu_v11_0_get_clk_info_from_vbios(struct smu_context *smu) output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; smu->smu_table.boot_values.dclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; +if ((smu->smu_table.boot_values.format_revision ==3 ) && + (smu->smu_table.boot_values.content_revision >=2 )) { +memset (&input,0 ,sizeof (input)); + input.clk_id =SMU11_SYSPLL1_0_FCLK_ID ; + input.syspll_id =SMU11_SYSPLL1_2_ID ; + input.command =GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ ; + index =get_index_into_master_table (atom_master_list_of_command_functions_v2_1, + getsmuclockinfo); + + ret =amdgpu_atom_execute_table (adev->mode_info.atom_context, index, + (uint32_t *)&input); +if (ret) +return -EINVAL ; + + output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&input; + smu->smu_table.boot_values.fclk =le32_to_cpu (output->atom_smu_outputclkfreq.smu_clock_freq_hz) /10000 ; + } +return 0 ; }
--
2.22.0
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 drm/amd/powerplay: set Arcturus default fclk as bootup value on dpm disabled
In reply to a message not in the archiveOn fclk dpm disabled, the default dpm table will be setup with only one level and clock frequency as bootup value.
--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +2 -1
@@ -463,7 +463,8 @@ static int arcturus_set_default_dpm_table(struct smu_context *smu)return ret; } }else { - single_dpm_table->count =0 ; + single_dpm_table->count =1 ; + single_dpm_table->dpm_levels[0 ].value = smu->smu_table.boot_values.fclk /100 ; }arcturus_init_single_dpm_state (&(single_dpm_table->dpm_state));
Signature · 6 lines
2.22.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 4/4] drm/amd/powerplay: set Arcturus default fclk as bootup value on dpm disabled
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Evan Quan <[email protected]>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected] <[email protected]>
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 4/4] drm/amd/powerplay: set Arcturus default fclk as bootup value on dpm disabled
On fclk dpm disabled, the default dpm table will be setup with only one level and clock frequency as bootup value.
--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +2 -1
@@ -463,7 +463,8 @@ static int arcturus_set_default_dpm_table(struct smu_context *smu)return ret; } }else { - single_dpm_table->count =0 ; + single_dpm_table->count =1 ; + single_dpm_table->dpm_levels[0 ].value = smu->smu_table.boot_values.fclk /100 ; }arcturus_init_single_dpm_state (&(single_dpm_table->dpm_state));
--
2.22.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-byBest Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Evan Quan <[email protected]>
Sent: Friday, August 16, 2019 2:08 PM
To: [email protected] <[email protected]>
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 1/4] drm/amd/powerplay: update Arcturus smc fw and driver interface header
Update smc fw and driver interface header.
--- .../powerplay/inc/smu11_driver_if_arcturus.h | 17 +++++++++++------ drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_arcturus.h +11 -6
@@ -27,7 +27,7 @@// *** IMPORTANT *** // SMU TEAM: Always increment the interface version if // any structure is changed in this file -//#define SMU11_DRIVER_IF_VERSION 0x08 +//#define SMU11_DRIVER_IF_VERSION 0x09 #define PPTABLE_ARCTURUS_SMU_VERSION 4
@@ -691,7 +691,12 @@ typedef struct {uint16_t XgmiFclkFreq [NUM_XGMI_PSTATE_LEVELS ];uint16_t XgmiSocVoltage [NUM_XGMI_PSTATE_LEVELS ]; -uint32_t BoardReserved[10 ]; +// 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; + +uint32_t BoardReserved[9 ];// Padding for MMHUB - do not modify this uint32_t MmHubPadding[8 ];// SMU internal use
@@ -738,7 +743,7 @@ typedef struct {uint32_t Padding[4 ];// Padding - ignore -uint32_t MmHubPadding[7 ];// SMU internal use +uint32_t MmHubPadding[8 ];// SMU internal use } SmuMetrics_t;
@@ -748,7 +753,7 @@ typedef struct {float avgPsmVoltage[75 ];float minPsmVoltage[75 ]; -uint32_t MmHubPadding[3 ];// SMU internal use +uint32_t MmHubPadding[8 ];// SMU internal use } AvfsDebugTable_t; typedef struct {
@@ -797,9 +802,9 @@ typedef struct {uint32_t P2VCharzFreq[AVFS_VOLTAGE_COUNT ];// in 10KHz units -uint32_t EnabledAvfsModules; +uint32_t EnabledAvfsModules[2 ]; -uint32_t MmHubPadding[7 ];// SMU internal use +uint32_t MmHubPadding[8 ];// SMU internal use } AvfsFuseOverride_t;/* NOT CURRENTLY USED
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 0x08 +#define SMU11_DRIVER_IF_VERSION_ARCT 0x09#define SMU11_DRIVER_IF_VERSION_NV10 0x33#define SMU11_DRIVER_IF_VERSION_NV12 0x33#define SMU11_DRIVER_IF_VERSION_NV14 0x33
--
2.22.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