drm/amdgpu/swsmu: don't bail early on hw_setup on resume
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/swsmu: don't bail early on hw_setup on resume
The SMU comes back up with DPM enabled by the sbios, but the driver still has to set up the SMU/driver mailbox, etc.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -1
@@ -1102,7 +1102,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)uint32_t pcie_gen =0 , pcie_width =0 ;int ret =0 ; -if (adev->in_suspend &&smu_is_dpm_running (smu)) { +if (!smu->is_apu && adev->in_suspend &&smu_is_dpm_running (smu)) {dev_info (adev->dev,"dpm has been enabled\n" );/* this is needed specifically */ if ((adev->asic_type >= CHIP_SIENNA_CICHLID) &&
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Best Regards,
Kevin
________________________________
From: amd-gfx <[email protected]> on behalf of Alex Deucher <[email protected]>
Sent: Friday, March 26, 2021 12:37 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/swsmu: don't bail early on hw_setup on resume
The SMU comes back up with DPM enabled by the sbios, but the driver still has to set up the SMU/driver mailbox, etc.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -1
@@ -1102,7 +1102,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)uint32_t pcie_gen =0 , pcie_width =0 ;int ret =0 ; -if (adev->in_suspend &&smu_is_dpm_running (smu)) { +if (!smu->is_apu && adev->in_suspend &&smu_is_dpm_running (smu)) {dev_info (adev->dev,"dpm has been enabled\n" );/* this is needed specifically */ if ((adev->asic_type >= CHIP_SIENNA_CICHLID) &&
--
2.30.2
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CKevin1.Wang%40amd.com%7C97142ed601fb40e5733308d8f010ecb4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637523302779786035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8ToBQ2CXNmbeA%2BH01D6frUUCvrsL4TzGiiId%2B2gVHi8%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Quoted 9 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2021/March/26, Friday 12:38 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/swsmu: don't bail early onhw_setupon resume
Quoted 4 lines
The SMU comes back up with DPM enabled by the sbios, but the driver still has to set up the SMU/driver mailbox, etc.
Signed-off-by Alex Deucher <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1
-1@@ -1102,7 +1102,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)uint32_t pcie_gen =0 , pcie_width =0 ;int ret =0 ; -if (adev->in_suspend &&smu_is_dpm_running (smu)) { +if (!smu->is_apu && adev->in_suspend &&smu_is_dpm_running (smu)) {dev_info (adev->dev,"dpm has been enabled\n" );/* this is needed specifically */
if ((adev->asic_type>=CHIP_SIENNA_CICHLID) &&
--
2.30.2
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
freedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Czhan.liu%40amd.com%7C500744d08f7946b2c5d e08d8f010ec49%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6375 23302768646367%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vN JawxwfojJrxNOG5L8Y2BAWpGRRN6valpk6y00XIQw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Can someone double check this on RN/CZN with S3 and S0ix?
Alex
________________________________
From: Liu, Zhan <[email protected]>
Sent: Friday, March 26, 2021 1:46 AM
To: Deucher, Alexander <[email protected]>; [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu/swsmu: don't bail early on hw_setup on resume
[AMD Official Use Only - Internal Distribution Only]
Quoted 9 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2021/March/26, Friday 12:38 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/swsmu: don't bail early onhw_setupon resume
Quoted 4 lines
The SMU comes back up with DPM enabled by the sbios, but the driver still has to set up the SMU/driver mailbox, etc.
Signed-off-by Alex Deucher <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1
-1@@ -1102,7 +1102,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)uint32_t pcie_gen =0 , pcie_width =0 ;int ret =0 ; -if (adev->in_suspend &&smu_is_dpm_running (smu)) { +if (!smu->is_apu && adev->in_suspend &&smu_is_dpm_running (smu)) {dev_info (adev->dev,"dpm has been enabled\n" );/* this is needed specifically */
if ((adev->asic_type>=CHIP_SIENNA_CICHLID) &&
--
2.30.2
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
freedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Czhan.liu%40amd.com%7C500744d08f7946b2c5d e08d8f010ec49%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6375 23302768646367%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vN JawxwfojJrxNOG5L8Y2BAWpGRRN6valpk6y00XIQw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Looks like RN is immune due to the way it's is_dpm_running function is implemented. Maybe something like this is a better solution:
https://patchwork.freedesktop.org/patch/426293/
Alex
Quoted 56 lines · Alexander
[AMD Official Use Only - Internal Distribution Only]
Can someone double check this on RN/CZN with S3 and S0ix?
Alex
________________________________
From: Liu, Zhan <[email protected]>
Sent: Friday, March 26, 2021 1:46 AM
To: Deucher, Alexander <[email protected]>; [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu/swsmu: don't bail early onhw_setupon resume[AMD Official Use Only - Internal Distribution Only]
Quoted 9 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2021/March/26, Friday 12:38 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/swsmu: don't bail early onhw_setupon resumeQuoted 4 lines
The SMU comes back up with DPM enabled by the sbios, but the driver still has to set up the SMU/driver mailbox, etc.
Signed-off-by Alex Deucher <[email protected]>Reviewed-by Zhan Liu <[email protected]>Quoted 23 lines
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1
-1@@ -1102,7 +1102,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)uint32_t pcie_gen =0 , pcie_width =0 ;int ret =0 ; -if (adev->in_suspend &&smu_is_dpm_running (smu)) { +if (!smu->is_apu && adev->in_suspend &&smu_is_dpm_running (smu)) {dev_info (adev->dev,"dpm has been enabled\n" );/* this is needed specifically */
if ((adev->asic_type>=CHIP_SIENNA_CICHLID) &&
--
2.30.2
Quoted 14 lines
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
freedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Czhan.liu%40amd.com%7C500744d08f7946b2c5d e08d8f010ec49%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6375 23302768646367%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vN JawxwfojJrxNOG5L8Y2BAWpGRRN6valpk6y00XIQw%3D&reserved=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
[AMD Public Use]
Quoted 8 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: 2021/March/26, Friday 5:01 PM
To: Deucher, Alexander <[email protected]>
Cc: Liu, Zhan <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu/swsmu: don't bail early onhw_setupon resume
Quoted 5 lines
Looks like RN is immune due to the way it's
is_dpm_runningfunction is implemented. Maybe something like this is a better solution:
https://patchwork.freedesktop.org/patch/426293/Alex
Thanks Alex! Yes, I agree, this solution looks better to me. Since we've already done the same thing for RN, it totally makes sense for us to make VG immune as well. And we can limit the influence to VG only in this case.
Its self-explanatory that this change can get the issue fixed, but I still gave it a run on VG and confirmed the issue is indeed get fixed here.
I will add my "Reviewed-by" under your new patch.
Quoted 42 lines
Quoted 39 lines · Alexander
[AMD Official Use Only - Internal Distribution Only]
Can someone double check this on RN/CZN with S3 and S0ix?
Alex
________________________________
From: Liu, Zhan <[email protected]>
Sent: Friday, March 26, 2021 1:46 AM
To: Deucher, Alexander <[email protected]>; [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu/swsmu: don't bail early onhw_setupon resume[AMD Official Use Only - Internal Distribution Only]
Quoted 9 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2021/March/26, Friday 12:38 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/swsmu: don't bail early onhw_setupon resumeQuoted 4 lines
The SMU comes back up with DPM enabled by the sbios, but the driver still has to set up the SMU/driver mailbox, etc.
Signed-off-by Alex Deucher <[email protected]>Reviewed-by Zhan Liu <[email protected]>Quoted 4 lines
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 26 lines
Quoted 6 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c static int smu_smc_hw_setup(struct
Quoted 6 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-0@@ -1102,7 +1102,7 @@ static int smu_smc_hw_setup(struct
smu_contextQuoted 19 lines
Quoted 12 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1
-1*smu)uint32_t pcie_gen =0 , pcie_width =0 ;int ret =0 ; -if (adev->in_suspend &&smu_is_dpm_running (smu)) { +if (!smu->is_apu && adev->in_suspend &&smu_is_dpm_running (smu)) {dev_info (adev->dev,"dpm has been enabled\n" );/* this is needed specifically */ if ((
adev->asic_type>=CHIP_SIENNA_CICHLID) &&
--
2.30.2Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]_______________________________________________
amd-gfx mailing list
[email protected]
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx