New: [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
https://bugzilla.kernel.org/show_bug.cgi?id=205393
Bug ID: 205393
Summary: [amdgpu powerplay] vega10: custom pp_table, AVFS
accidentally reenabled after display powersave
Product: Drivers
Version: 2.5
Kernel Version: 5.4-rc5
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
Assignee: [email protected]
Reporter: [email protected]
Regression: No
Created attachment 285755
--> https://bugzilla.kernel.org/attachment.cgi?id=285755&action=edit
patch to prevent AVFS reenabling (against 5.4-rc5)
When uploading a customized powerplay table, AVFS feature becomes correctly disabled.
But after a power save (blanc screen) event, AVFS becomes accidentally enabled again. This results in unwanted gfx voltage changes.
Example:
vddc = 1.075V after pp table upload (correct).
vddc = 1.150V after power save event (set by smc because AVFS feature reenabled).
I have debugged this issue and found a simple solution. There is a patch attached, that solves the problem.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
https://bugzilla.kernel.org/show_bug.cgi?id=205393
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #285757|0 |1
is obsolete| |
--- Comment #2 from [email protected] ---
Created attachment 285775
--> https://bugzilla.kernel.org/attachment.cgi?id=285775&action=edit
patch to prevent AVFS reenabling, when custom pptable is loaded
patch refined (diff -upr6)
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected] Kernel Version|5.4-rc5 |~agd5f/linux (drm-next), | |5.4-rc5, earlier kernels
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #3 from Alex Deucher ([email protected]) --- Created attachment 285821
--> https://bugzilla.kernel.org/attachment.cgi?id=285821&action=edit
possible fix
Does this patch work? I think it would be better to move the change above the call to vega10_update_avfs() to avoid enabling avfs only to disable it again later.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #4 from [email protected] ---
Yes, your patch works and has the same effect, apparently.
What confused me and the reason why i prefered to leave the vega10_update_avfs() call before the flag modification, was the code inside vega10_update_avfs():
static int vega10_update_avfs(struct pp_hwmgr *hwmgr)
{
struct vega10_hwmgr *data = hwmgr->backend;
if (data->need_update_dpm_table & DPMTABLE_OD_UPDATE_VDDC) {
vega10_avfs_enable(hwmgr, false);
} else if (data->need_update_dpm_table) {
vega10_avfs_enable(hwmgr, false);
vega10_avfs_enable(hwmgr, true);
} else {
vega10_avfs_enable(hwmgr, true);
}
return 0;
}Here is a disable/enable sequence inserted, perhaps for a reason?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #5 from Alex Deucher ([email protected]) --- (In reply to haro41 from comment #4)
Quoted 22 lines
Yes, your patch works and has the same effect, apparently.
What confused me and the reason why i prefered to leave the
vega10_update_avfs()call before the flag modification, was the code insidevega10_update_avfs():static int
vega10_update_avfs(struct pp_hwmgr *hwmgr){ struct vega10_hwmgr *data = hwmgr->backend; if (data->need_update_dpm_table & DPMTABLE_OD_UPDATE_VDDC) { vega10_avfs_enable(hwmgr, false); } else if (data->need_update_dpm_table) { vega10_avfs_enable(hwmgr, false); vega10_avfs_enable(hwmgr, true); } else { vega10_avfs_enable(hwmgr, true); } return 0; }
Quoted 1 line
Here is a disable/enable sequence inserted, perhaps for a reason?
It's needed to disable the current AFVS settings before reapplying the new ones. That shouldn't be necessary with the DPMTABLE_OD_UPDATE_VDDC flag set because in that case, we just disable AVFS.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #6 from [email protected] ---
(In reply to Alex Deucher from comment #5)
Quoted 20 lines
(In reply to haro41 from comment #4)
Quoted 19 lines
Yes, your patch works and has the same effect, apparently.
What confused me and the reason why i prefered to leave the
vega10_update_avfs()call before the flag modification, was the code insidevega10_update_avfs():static int
vega10_update_avfs(struct pp_hwmgr *hwmgr){ struct vega10_hwmgr *data = hwmgr->backend; if (data->need_update_dpm_table & DPMTABLE_OD_UPDATE_VDDC) { vega10_avfs_enable(hwmgr, false); } else if (data->need_update_dpm_table) { vega10_avfs_enable(hwmgr, false); vega10_avfs_enable(hwmgr, true); } else { vega10_avfs_enable(hwmgr, true); }
Quoted 8 lines
Quoted 4 lines
return 0; }Here is a disable/enable sequence inserted, perhaps for a reason?
It's needed to disable the current AFVS settings before reapplying the new ones. That shouldn't be necessary with the
DPMTABLE_OD_UPDATE_VDDCflag set because in that case, we just disable AVFS.
Ok, that makes sense. Thanks for clarification and for applying the fix.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #7 from [email protected] ---
Is this really only relevant for Vega 10?
Also on Polaris voltage is reset to default when using a customized powerplay table e.g. after a modeline switch (happens when closing Sway session with ctr
+ shift + e).
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #8 from [email protected] ---
Small correction: It's actually $mod (meta/win key by default) + shift + e.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #9 from [email protected] ---
(In reply to tempel.julian from comment #7)
Quoted 4 lines
Is this really only relevant for Vega 10?
Also on Polaris voltage is reset to default when using a customized powerplay table e.g. after a modeline switch (happens when closing Sway session with ctr + shift + e).
I don't have a polaris card for debugging, but looking at the code, i think that a similar bug could be relevant too. Vega10 is smu9, while Polaris is smu7, but both firmwares generally support AVFS and enabling/disabling this feature.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #10 from [email protected] ---
I'd try out patches if you want. :)
Though it's probably not really important, as the regular overdrive functionality works fine with Polaris.
Much more important would be situation for Navi, as regular overdrive doesn't work with it yet and one is dependent on the powerplay table method:
https://bugs.freedesktop.org/show_bug.cgi?id=111762
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #11 from Alex Deucher ([email protected]) --- Created attachment 285835
--> https://bugzilla.kernel.org/attachment.cgi?id=285835&action=edit
patch for smu7
Try this.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #12 from [email protected] ---
(In reply to Alex Deucher from comment #11)
Quoted 4 lines
Created attachment 285835 [details]
patch for smu7Try this.
Thank you, I can confirm that it fixes the issue on Polaris.
Would the same be required for Navi as well?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #13 from Alex Deucher ([email protected]) --- (In reply to tempel.julian from comment #12)
Quoted 2 lines
Would the same be required for Navi as well?
No. IIRC, vega12 and newer handle voltage differently.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
--- Comment #14 from [email protected] ---
(In reply to Alex Deucher from comment #13)
Quoted 5 lines
(In reply to tempel.julian from comment #12)
Quoted 2 lines
Would the same be required for Navi as well?
No. IIRC, vega12 and newer handle voltage differently.
Ok, thanks. Maybe I can give it a try with someone else's Navi card before the end of the year. I'd report back in case something odd shows up.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 205393] [amdgpu powerplay] vega10: custom pp_table, AVFS accidentally reenabled after display powersave
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205393
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |CODE_FIX--- Comment #15 from [email protected] --- Considering this bug as resolved. Thanks everybody.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel