https://bugs.freedesktop.org/show_bug.cgi?id=98988
Bug ID: 98988 Summary: [Regression, bisected] New BONAIRE UVD firmware causes DPM problems and extremely slow performance Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/Radeon Assignee: dri-devel@lists.freedesktop.org Reporter: falaca@gmail.com
Created attachment 128327 --> https://bugs.freedesktop.org/attachment.cgi?id=128327&action=edit Kernel bisect log
I have a 2GB Radeon R7 260X (BONAIRE).
With kernel 4.7 and above, I was experiencing extremely slow performance. Even desktop animations on Ubuntu 16.04 w/ Unity desktop are extremely choppy, probably about 10fps.
dmesg produces several instances of the following error message: [drm:ci_dpm_set_power_state [radeon]] *ERROR* ci_upload_dpm_level_enable_mask failed
I did a kernel bisect, and narrowed the problem to the following commit: http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?...
The bisect log is attached.
It seems that the commit adds support for a new firmware file, "bonaire_uvd.bin". If the driver fails in loading the new firmware file, it falls back to the legacy file, "BONAIRE_uvd.bin".
To confirm that the issue is caused by the new firmware, I deleted bonaire_uvd.bin, and performance is restored to normal with the latest stable kernel (4.9.0-rc7).
For what it's worth, here are the contents of /sys/kernel/debug/dri/64/radeon_pm_info while idling on the Ubuntu desktop with the new firmware:
uvd disabled vce disabled power level avg sclk: 115774 mclk: 15000
And the old firmware: uvd disabled vce disabled power level avg sclk: 30248 mclk: 165000
https://bugs.freedesktop.org/show_bug.cgi?id=98988
John Brooks bugs.freedesktop@fastquake.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs.freedesktop@fastquake. | |com
--- Comment #1 from John Brooks bugs.freedesktop@fastquake.com --- Created attachment 128536 --> https://bugs.freedesktop.org/attachment.cgi?id=128536&action=edit Bisect log
I just bisected the regression that has been affecting my R9 290 for a long time. I ended up at the same commit as Furkan: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=70...
I also observed the same radeon_pm_info debug output:
On good commits: uvd disabled vce disabled power level avg sclk: 100000 mclk: 126000
On bad commits: uvd disabled vce disabled power level avg sclk: 100000 mclk: 15000
Please let me know if you need any more information, or if you want me to test something for you.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
John Brooks bugs.freedesktop@fastquake.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #128536|text/x-log |text/plain mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #2 from John Brooks bugs.freedesktop@fastquake.com --- Commenting out http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/...
or removing /lib/firmware/radeon/bonaire_uvd.bin fixes the problem on my system.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
leoxsliu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leoxsliu@gmail.com
--- Comment #3 from leoxsliu@gmail.com --- Created attachment 128558 --> https://bugs.freedesktop.org/attachment.cgi?id=128558&action=edit Bonaire UVD firmware
Please try attached Bonaire UVD firmware.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #4 from John Brooks bugs.freedesktop@fastquake.com --- (In reply to leoxsliu from comment #3)
Created attachment 128558 [details] Bonaire UVD firmware
Please try attached Bonaire UVD firmware.
This appears to fix the problem for me.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #5 from John Brooks bugs.freedesktop@fastquake.com --- The firmware from comment #3 was distributed in linux-firmware starting with commit 5e6165a8705613646c9a5a282f0a7243fe5dafdc (https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/com...). Which corresponds to Ubuntu's linux-firmware package version 1.158, released on May 6, 2016.
People who already had this firmware would not experience the regression, which could explain the mixed reports of reproducibility.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #6 from Alex Deucher alexdeucher@gmail.com --- What is the md5sum of the bonaire_uvd.bin file on your system? For the latest file in git (http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plai...) I get 3106157934a8feb55145c4f5de3128e2 which matches the md5sum in the firmware Leo attached in attachment 128558.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #7 from Alex Deucher alexdeucher@gmail.com --- (In reply to John Brooks from comment #5)
The firmware from comment #3 was distributed in linux-firmware starting with commit 5e6165a8705613646c9a5a282f0a7243fe5dafdc (https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/ commit/?id=5e6165a8705613646c9a5a282f0a7243fe5dafdc). Which corresponds to Ubuntu's linux-firmware package version 1.158, released on May 6, 2016.
People who already had this firmware would not experience the regression, which could explain the mixed reports of reproducibility.
The latest firmware from upstream linux-firmware.git matches what Leo posted. I think you just need to update your firmware from linux-firmware.git and Ubuntu needs to update as well if they haven't already.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #8 from John Brooks bugs.freedesktop@fastquake.com --- (In reply to Alex Deucher from comment #6)
What is the md5sum of the bonaire_uvd.bin file on your system? For the latest file in git (http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/ plain/radeon/bonaire_uvd.bin) I get 3106157934a8feb55145c4f5de3128e2 which matches the md5sum in the firmware Leo attached in attachment 128558 [details].
I clobbered my backup by accident but it was different from that. The one that apt-get gives me if I reinstall linux-firmware (version 1.157.6 from xenial-updates; this is Mint 18) has an md5sum of 9f2ba7e720e2af4d7605a9a4fd903513
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #9 from Alex Deucher alexdeucher@gmail.com --- I think the fix is to make sure Ubuntu has the latest firmware from the linux firmware git tree.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #10 from Furkan falaca@gmail.com --- I can also confirm that the new firmware image solves the issue for me.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #11 from Michel Dänzer michel@daenzer.net --- Should we add code to the driver to avoid the bad firmware? Or can we just resolve this report as NOTOURBUG?
https://bugs.freedesktop.org/show_bug.cgi?id=98988
--- Comment #12 from John Brooks bugs.freedesktop@fastquake.com --- (In reply to Alex Deucher from comment #9)
I think the fix is to make sure Ubuntu has the latest firmware from the linux firmware git tree.
Ubuntu only started shipping an affected kernel in 16.10 (yakkety), and in that release they are also shipping the updated linux-firmware (I downloaded the package from http://packages.ubuntu.com/yakkety/linux-firmware and ran md5sum on the file). I think that the Ubuntu users affected by this issue are those that installed a newer kernel on an older Ubuntu release. Those users will just have to make sure they install the newer firmware too.
Anyone using kernel 4.7+ should make sure that their bonaire_uvd.bin is up to date.
https://bugs.freedesktop.org/show_bug.cgi?id=98988
Martin Peres martin.peres@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |MOVED
--- Comment #13 from Martin Peres martin.peres@free.fr --- -- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/763.
dri-devel@lists.freedesktop.org