Skip to contentSkip to conversation

New BONAIRE UVD firmware causes DPM problems and extremely slow performance

Bug 98988 [email protected] 1 participant 15 messages Dec 4, 2016 – Nov 19, 2019

lore
Share & tools
lore
#0 lore raw

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: [email protected]
Reporter: [email protected]

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/?id=7050c6ef5f0e9bc5e6bf9eb035320b70f731b919

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

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=98988

John Brooks <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |bugs.freedesktop@fastquake.
                   |                            |com

--- Comment #1 from John Brooks <[email protected]> --- 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=7050c6ef5f0e9bc5e6bf9eb035320b70f731b919

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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

John Brooks <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #128536|text/x-log                  |text/plain
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #2 from John Brooks <[email protected]> --- Commenting out
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/radeon/radeon_uvd.c?id=7050c6ef5f0e9bc5e6bf9eb035320b70f731b919#n130

or removing /lib/firmware/radeon/bonaire_uvd.bin fixes the problem on my system.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #3 from [email protected] ---
Created attachment 128558
--> https://bugs.freedesktop.org/attachment.cgi?id=128558&action=edit
Bonaire UVD firmware

Please try attached Bonaire UVD firmware.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #4 from John Brooks <[email protected]> --- (In reply to leoxsliu from comment #3)

Quoted 4 lines

Created attachment 128558 [details]
Bonaire UVD firmware

Please try attached Bonaire UVD firmware.

This appears to fix the problem for me.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #5 from John Brooks <[email protected]> --- 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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #6 from Alex Deucher <[email protected]> ---
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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #7 from Alex Deucher <[email protected]> --- (In reply to John Brooks from comment #5)

Quoted 8 lines

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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #8 from John Brooks <[email protected]> --- (In reply to Alex Deucher from comment #6)

Quoted 6 lines

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

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #9 from Alex Deucher <[email protected]> ---
I think the fix is to make sure Ubuntu has the latest firmware from the linux firmware git tree.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #11 from Michel Dänzer <[email protected]> --- Should we add code to the driver to avoid the bad firmware? Or can we just resolve this report as NOTOURBUG?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

--- Comment #12 from John Brooks <[email protected]> --- (In reply to Alex Deucher from comment #9)

Quoted 2 lines

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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=98988

Martin Peres <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #13 from Martin Peres <[email protected]> --- -- 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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel