https://bugzilla.kernel.org/show_bug.cgi?id=78111
Bug ID: 78111 Summary: APU turbo core boost not working when radeon.dpm=1 Product: Drivers Version: 2.5 Kernel Version: 3.14.6 Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-dri@kernel-bugs.osdl.org Reporter: bgz.marko@gmail.com Regression: No
I am testing with A6-1450 APU on Arch Linux. If I pass radeon.dpm=1 parameter at boot and start a single core workload then turbostat will report max frequency of about 1000 MHz:
Core CPU Avg_MHz Bzy_MHz TSC_MHz time - - 262 998 998 5** 0 0 12 998 998 5** 1 1 998 998 998 2 2 16 998 998 3 3 21 998 998
"cpupower frequency-info" reports that boost state support is supported, but not active:
boost state support: Supported: yes Active: no
However, when dynamic power management is disabled (radeon.dpm=0), turbostat reports higher frequencies for single core load, up to 1300 Mhz:
Core CPU Avg_MHz Bzy_MHz TSC_MHz time - - 320 1214 998 5** 0 0 9 1226 998 5** 1 1 13 1194 998 2 2 41 1143 998 3 3 1216 1216 998
"cpupower frequency-info" confirms that boost is now active.
boost state support: Supported: yes Active: yes
https://bugzilla.kernel.org/show_bug.cgi?id=78111
Alex Deucher alexdeucher@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexdeucher@gmail.com
--- Comment #1 from Alex Deucher alexdeucher@gmail.com --- Please attach your dmesg output with radeon.dpm=1
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #2 from Alex Deucher alexdeucher@gmail.com --- Created attachment 139971 --> https://bugzilla.kernel.org/attachment.cgi?id=139971&action=edit enable bapm
The attached patch will allow the GPU and CPU to share TDP, but note that this is disabled by default at the moment.
https://bugzilla.kernel.org/show_bug.cgi?id=78111
Kertesz Laszlo laszlo.kertesz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |laszlo.kertesz@gmail.com
--- Comment #3 from Kertesz Laszlo laszlo.kertesz@gmail.com --- I reported basicalle the same thing in bug #62861. How dangerous can this change be? As in would i have to worry about frying the APU?
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #4 from Alex Deucher alexdeucher@gmail.com --- You may get system or GPU hangs, but it shouldn't fry anything.
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #5 from Marko Srebre bgz.marko@gmail.com --- Created attachment 140061 --> https://bugzilla.kernel.org/attachment.cgi?id=140061&action=edit dmesg output (with enable bapm path)
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #6 from Marko Srebre bgz.marko@gmail.com --- Thanks Alex. The patch that enables bapm works. Boost state is now active. Frequency gets boosted in single core workloads.
Are there any plans to make 'bapm' tunable via boot parameters or /sys?
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #7 from Alex Deucher alexdeucher@gmail.com --- We can probably enable it by default on KV/KB systems at some point. It had some stability issues on trinity APUs so I disabled it across the board, so it remains to be seen if there are any problems with newer APUs.
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #8 from Alex Deucher alexdeucher@gmail.com --- Does plugging/unplugging the AC adapter cause any problems with bapm enabled? The reason it was disabled on TN/RL parts is because there were hangs on some systems when switching to/from AC power.
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #9 from Marko Srebre bgz.marko@gmail.com --- I've been using enable_bapm for a day now, here are my observations:
* There are no issues regarding lockups. Not even when plugging/unplugging AC adapter or sleeping/resuming.
* Boost state is active on boot regardless of AC begin plugged or not. However, boost will get deactivated if at a later time AC is deplugged, and get activated again on plugging. While this may make sense in some situations, I prefer boost being always active, so for the time being I just changed the relevant code so it's always on. I guess it would make sense for it to be an option that could be tuned.
* There is some strange behaviour associated with this particular APU (A6-1450). This is probably not Linux specific as I've seen reports on it for Windows too. After boot turbo would only work for a single core and up to 1.3Ghz. But after doing a sleep/resume cycle turbo works for all 4 cores and up to full 1.4Ghz (the difference is also quite audible since the fans go wild). As if available TDP would somehow get much bigger after sleep/resume.
https://bugzilla.kernel.org/show_bug.cgi?id=78111
Alex mad_sam@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mad_sam@bk.ru
--- Comment #10 from Alex mad_sam@bk.ru --- AMD A8-5557M (Richland). APU turbo core boost still is not working.
With radeon.dpm=1
boost state support: Supported: yes Active: no Boost States: 3 Total States: 8 Pstate-Pb0: 3100MHz (boost state) Pstate-Pb1: 2800MHz (boost state) Pstate-Pb2: 2400MHz (boost state) Pstate-P0: 2100MHz Pstate-P1: 1900MHz Pstate-P2: 1700MHz Pstate-P3: 1400MHz Pstate-P4: 900MHz
|Mperf || Idle_Stats CPU | C0 | Cx | Freq || POLL | C1 | C2 0| 20,65| 79,35| 2082|| 0,00| 16,43| 66,12 1| 42,31| 57,69| 2091|| 0,00| 1,22| 57,65 2| 72,17| 27,83| 2093|| 0,00| 1,44| 26,81 3| 16,95| 83,05| 2090|| 0,00| 3,68| 82,30
With radeon.dpm=0
boost state support: Supported: yes Active: yes
|Mperf || Idle_Stats CPU | C0 | Cx | Freq || POLL | C1 | C2 0| 51,88| 48,12| 2731|| 0,00| 6,83| 42,66 1| 38,85| 61,15| 2742|| 0,00| 0,40| 61,93 2| 42,05| 57,95| 2821|| 0,00| 32,44| 27,37 3| 73,37| 26,63| 2825|| 0,00| 11,34| 15,95
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #11 from Alex mad_sam@bk.ru --- (In reply to Alex from comment #10)
AMD A8-5557M (Richland). APU turbo core boost still is not working.
With radeon.dpm=1
boost state support: Supported: yes Active: no Boost States: 3 Total States: 8 Pstate-Pb0: 3100MHz (boost state) Pstate-Pb1: 2800MHz (boost state) Pstate-Pb2: 2400MHz (boost state) Pstate-P0: 2100MHz Pstate-P1: 1900MHz Pstate-P2: 1700MHz Pstate-P3: 1400MHz Pstate-P4: 900MHz
|Mperf || Idle_Stats
CPU | C0 | Cx | Freq || POLL | C1 | C2 0| 20,65| 79,35| 2082|| 0,00| 16,43| 66,12 1| 42,31| 57,69| 2091|| 0,00| 1,22| 57,65 2| 72,17| 27,83| 2093|| 0,00| 1,44| 26,81 3| 16,95| 83,05| 2090|| 0,00| 3,68| 82,30
With radeon.dpm=0
boost state support: Supported: yes Active: yes
|Mperf || Idle_Stats CPU | C0 | Cx | Freq || POLL | C1 | C2 0| 51,88| 48,12| 2731|| 0,00| 6,83| 42,66 1| 38,85| 61,15| 2742|| 0,00| 0,40| 61,93 2| 42,05| 57,95| 2821|| 0,00| 32,44| 27,37 3| 73,37| 26,63| 2825|| 0,00| 11,34| 15,95
Tested on kernel 4.4
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #12 from Alex Deucher alexdeucher@gmail.com --- Setting radeon.bapm=1 will enable it.
https://bugzilla.kernel.org/show_bug.cgi?id=78111
--- Comment #13 from Alex mad_sam@bk.ru --- (In reply to Alex Deucher from comment #12)
Setting radeon.bapm=1 will enable it.
It works! Thank You.
https://bugzilla.kernel.org/show_bug.cgi?id=78111
mirh (mirh@protonmail.ch) changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mirh@protonmail.ch
--- Comment #14 from mirh (mirh@protonmail.ch) --- OP has a Temash/Kabini APU, that afaict has bapm enabled by default since 3.16.
Can this be closed?
dri-devel@lists.freedesktop.org