drm/amd: Don't show warning on reading vbios values for SMU13 3.1
Subsystems (3)
PATCH 1/1 drm/amd: Don't show warning on reading vbios values for SMU13 3.1
Some APUs with SMU13 are showing the following message:amdgpu 0000:63:00.0: amdgpu: Unexpected and unhandled version: 3.1
This warning isn't relevant for smu info 3.1, as no bootup information is present in the table.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2 -0
@@ -731,6 +731,8 @@ int smu_v13_0_get_vbios_bootup_values(struct smu_context *smu) smu->smu_table.boot_values.vclk = smu_info_v3_6->bootup_vclk_10khz; smu->smu_table.boot_values.dclk = smu_info_v3_6->bootup_dclk_10khz; smu->smu_table.boot_values.fclk = smu_info_v3_6->bootup_fclk_10khz; + }else if ((frev ==3 ) && (crev ==1 )) { +return 0 ; }else if ((frev ==4 ) && (crev ==0 )) { smu_info_v4_0 = (struct atom_smu_info_v4_0 *)header;
Signature · 1 line
2.25.1
Quoted 18 lines · Mario Limonciello
Some APUs with SMU13 are showing the following message:
amdgpu 0000:63:00.0: amdgpu: Unexpected and unhandled version: 3.1This warning isn't relevant for smu info 3.1, as no bootup information is present in the table.
Fixes 6a73454350c0 ("drm/amd/pm: correct the way for retrieving bootup clocks")Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +0
-0
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c int smu_v13_0_get_vbios_bootup_values(struct smu_context *smu) · line 735
Quoted 5 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2
-0@@ -731,6 +731,8 @@ int smu_v13_0_get_vbios_bootup_values(struct smu_context *smu) smu->smu_table.boot_values.vclk = smu_info_v3_6->bootup_vclk_10khz; smu->smu_table.boot_values.dclk = smu_info_v3_6->bootup_dclk_10khz; smu->smu_table.boot_values.fclk = smu_info_v3_6->bootup_fclk_10khz; + }else if ((frev ==3 ) && (crev ==1 )) { +return 0 ;
I don't know if Evan has any comments, but it might be better to just return if ((frev == 3) && (crev < 2)). I'm not sure off hand which smu_info table versions we might run into. Evan or Kenneth would know which smu_info table versions are valid on which SMU 13.x asics.
A;ex
Quoted 6 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +0
-1}else if ((frev ==4 ) && (crev ==0 )) { smu_info_v4_0 = (struct atom_smu_info_v4_0 *)header; --2.25.1
[AMD Official Use Only - General]
Thanks for the fix. Yes, the support for APUs was missing from the relevant code. I think you can just drop the piece of code below.
/////////////
else {
dev_warn(smu->adev->dev, "Unexpected and unhandled version: %d.%d\n",
(uint32_t)frev, (uint32_t)crev);
}/////////////
Either-way the patch is reviewed-by: Evan Quan <[email protected]>
BR
Evan
Quoted 56 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, June 16, 2022 11:12 AM
To: Limonciello, Mario <[email protected]>; Quan, Evan <[email protected]>; Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amd: Don't show warning on reading vbios values for SMU13 3.1drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c int smu_v13_0_get_vbios_bootup_values(struct
Quoted 20 lines · Mario Limonciello
Some APUs with SMU13 are showing the following message:
amdgpu 0000:63:00.0: amdgpu: Unexpected and unhandled version: 3.1This warning isn't relevant for smu info 3.1, as no bootup information is present in the table.
Fixes 6a73454350c0 ("drm/amd/pm: correct the way for retrievingbootup clocks")
Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +0
-0@@ -731,6 +731,8 @@ int smu_v13_0_get_vbios_bootup_values(struct
smu_context*smu)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c int smu_v13_0_get_vbios_bootup_values(struct · line 738
Quoted 8 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2
-0smu->smu_table.boot_values.vclk = smu_info_v3_6- bootup_vclk_10khz; smu->smu_table.boot_values.dclk = smu_info_v3_6- bootup_dclk_10khz; smu->smu_table.boot_values.fclk = smu_info_v3_6->bootup_fclk_10khz; + }else if ((frev ==3 ) && (crev ==1 )) { +return 0 ;I don't know if Evan has any comments, but it might be better to just return if ((frev == 3) && (crev < 2)). I'm not sure off hand which
smu_infotable versions we might run into. Evan or Kenneth would know whichsmu_infotable versions are valid on which SMU 13.x asics.A;ex
Quoted 7 lines
} else if ((frev == 4) && (crev == 0)) { smu_info_v4_0 = (struct atom_smu_info_v4_0*)header;
--
2.25.1
[AMD Official Use Only - General]
Quoted 15 lines
-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Wednesday, June 15, 2022 22:37
To: Alex Deucher <[email protected]>; Limonciello, Mario <[email protected]>; Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: RE: [PATCH] drm/amd: Don't show warning on reading vbios values for SMU13 3.1[AMD Official Use Only - General]
Thanks for the fix. Yes, the support for APUs was missing from the relevant code.
I think you can just drop the piece of code below. /////////////
Quoted 8 lines
else { dev_warn(smu->adev->dev, "Unexpected and unhandled version: %d.%d\n", (uint32_t)frev, (uint32_t)crev); }/////////////
Either-way the patch is reviewed-by: Evan Quan <[email protected]>
Thanks for reviewing this. I lean on leaving the warning in place and just catching the APU case. That way if a new table is introduced it helps to make sure that it really was updated here.
Quoted 60 lines
BR
EvanQuoted 7 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, June 16, 2022 11:12 AM
To: Limonciello, Mario <[email protected]>; Quan, Evan <[email protected]>; Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amd: Don't show warning on reading vbiosvalues
Quoted 34 lines
for SMU13 3.1
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c int smu_v13_0_get_vbios_bootup_values(struct
Quoted 20 lines · Mario Limonciello
Some APUs with SMU13 are showing the following message:
amdgpu 0000:63:00.0: amdgpu: Unexpected and unhandled version: 3.1This warning isn't relevant for smu info 3.1, as no bootup information is present in the table.
Fixes 6a73454350c0 ("drm/amd/pm: correct the way for retrievingbootup clocks")
Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +0
-0@@ -731,6 +731,8 @@ int smu_v13_0_get_vbios_bootup_values(struct
smu_context*smu)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c int smu_v13_0_get_vbios_bootup_values(struct · line 738
Quoted 8 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2
-0smu->smu_table.boot_values.vclk = smu_info_v3_6- bootup_vclk_10khz; smu->smu_table.boot_values.dclk = smu_info_v3_6- bootup_dclk_10khz; smu->smu_table.boot_values.fclk = smu_info_v3_6->bootup_fclk_10khz; + }else if ((frev ==3 ) && (crev ==1 )) { +return 0 ;Quoted 1 line
I don't know if Evan has any comments, but it might be better to just return
if
Quoted 14 lines
((frev == 3) && (crev < 2)). I'm not sure off hand which
smu_infotable versions we might run into. Evan or Kenneth would know whichsmu_infotable versions are valid on which SMU 13.x asics.A;ex
Quoted 7 lines
} else if ((frev == 4) && (crev == 0)) { smu_info_v4_0 = (struct atom_smu_info_v4_0*)header;
--
2.25.1