drm/amdgpu: handle default profile on GC 9.4.1
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: handle default profile on GC 9.4.1
It does not support fullscreen 3D.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
@@ -1267,7 +1267,8 @@ static int smu_sw_init(struct amdgpu_ip_block *ip_block) smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE ] =5 ; smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM ] =6 ; -if (smu->is_apu) +if (smu->is_apu || + (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,1 ))) smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT ];else smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D ];
Signature · 1 line
2.46.2
Deucher, Alexander
maintainer[AMD Official Use Only - AMD Internal Distribution Only]
Ping?
________________________________
From: Deucher, Alexander <[email protected]>
Sent: Friday, October 18, 2024 3:20 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: handle default profile on GC 9.4.1
It does not support fullscreen 3D.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
@@ -1267,7 +1267,8 @@ static int smu_sw_init(struct amdgpu_ip_block *ip_block) smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE ] =5 ; smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM ] =6 ; -if (smu->is_apu) +if (smu->is_apu || + (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,1 ))) smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT ];else smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D ];
--
2.46.2
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Alex,
I have found another problem with the current code based on the default workload setting to 3D fullscreen. For example, the default workload is set to 3D fullscreen first, but in boot, it's not applied yet. Then a vcn ring test comes in, sets the workload mask to vcn workload + 3D fullscreen. After the setting, Actually the workload mask is updated to vcn workload only. Then after the vcn ring test, the workload doesn't go to 3D fullscreen workload. It goes to bootup workload(PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT).
Let me try to fix it by today and get back to you.
For this patch itself, it's ok.
From: amd-gfx <[email protected]> On Behalf Of Deucher, Alexander
Sent: Tuesday, October 22, 2024 4:35 AM
To: [email protected]
Subject: Re: [PATCH] drm/amdgpu: handle default profile on GC 9.4.1
[AMD Official Use Only - AMD Internal Distribution Only]
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
[AMD Official Use Only - AMD Internal Distribution Only]
Ping?
________________________________
From: Deucher, Alexander <[email protected]<mailto:[email protected]>>
Sent: Friday, October 18, 2024 3:20 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Deucher, Alexander <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu: handle default profile on GC 9.4.1
It does not support fullscreen 3D.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
@@ -1267,7 +1267,8 @@ static int smu_sw_init(struct amdgpu_ip_block *ip_block) smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE ] =5 ; smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM ] =6 ; -if (smu->is_apu) +if (smu->is_apu || + (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,1 ))) smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT ];else smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D ];
--
2.46.2
Please double check the COMPUTE profile set by KFD as well.
Thanks,
Alex
Quoted 93 lines · Kenneth
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Alex,
I have found another problem with the current code based on the default workload setting to 3D fullscreen.
For example, the default workload is set to 3D fullscreen first, but in boot, it’s not applied yet.
Then a vcn ring test comes in, sets the workload mask to vcn workload + 3D fullscreen. After the setting,
Actually the workload mask is updated to vcn workload only. Then after the vcn ring test, the workload doesn’t go
to 3D fullscreen workload. It goes to bootup
workload(PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT).Let me try to fix it by today and get back to you.
For this patch itself, it’s ok.
Reviewed-by Kenneth Feng [email protected]*From:* amd-gfx <[email protected]> *On Behalf Of *Deucher, Alexander
*Sent:* Tuesday, October 22, 2024 4:35 AM
*To:* [email protected]
*Subject:* Re: [PATCH] drm/amdgpu: handle default profile on GC 9.4.1[AMD Official Use Only - AMD Internal Distribution Only]
*Caution:* This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
[AMD Official Use Only - AMD Internal Distribution Only]
Ping?
------------------------------*From:* Deucher, Alexander <[email protected]> *Sent:* Friday, October 18, 2024 3:20 PM
*To:* [email protected] <[email protected]> *Cc:* Deucher, Alexander <[email protected]> *Subject:* [PATCH] drm/amdgpu: handle default profile on GC 9.4.1It does not support fullscreen 3D.
Fixes 336568de918e ("drm/amdgpu/swsmu: default to fullscreen 3D profilefor dGPUs")
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2
-1@@ -1267,7 +1267,8 @@ static int smu_sw_init(struct amdgpu_ip_block *ip_block) smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE ] =5 ; smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM ] =6 ; -if (smu->is_apu) +if (smu->is_apu || + (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,1 ))) smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT ];else smu->workload_mask = 1 <<smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D]; --
2.46.2
Quoted 13 lines · Alex Deucher
It does not support fullscreen 3D.
Fixes 336568de918e ("drm/amdgpu/swsmu: default to fullscreen 3D profile for dGPUs")Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-0
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c static int smu_sw_init(struct amdgpu_ip_block *ip_block) · line 1272
Quoted 7 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2
-1@@ -1267,7 +1267,8 @@ static int smu_sw_init(struct amdgpu_ip_block *ip_block) smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE ] =5 ; smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM ] =6 ; -if (smu->is_apu) +if (smu->is_apu || + (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,4 ,1 ))) smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT ];
It's better to make this check generic and check against availability of 3D workload profile.
is_workload_profile_available(profile_index)
return smu->workload_map && smu->workload_map[index].valid_mapping .
Thanks,
Lijo
Quoted 2 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-0else smu->workload_mask =1 << smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D ];