New: [radeon HD 4570m] Error setting UVD clocks
https://bugzilla.kernel.org/show_bug.cgi?id=60858
Bug ID: 60858
Summary: [radeon HD 4570m] Error setting UVD clocks
Product: Drivers
Version: 2.5
Kernel Version: 3.11
Hardware: x86-64
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 107431
--> https://bugzilla.kernel.org/attachment.cgi?id=107431&action=edit
generated using $dmesg > dmesg.txt
I'm using the dell studio 1555 laptop with radeon HD 4570m graphic card. Running the stable 3.11 kernel with the latest linux-firmware files. I am not able to play any video using VDPAU regardless of the codec. During boot up there are a few errors regarding setting UVD clocks
[ 8.936898] [drm:radeon_uvd_send_upll_ctlreq] *ERROR* Timeout setting UVD clocks! [ 9.983683] [drm:radeon_uvd_send_upll_ctlreq] *ERROR* Timeout setting UVD clocks! [ 9.983695] [drm:r600_uvd_ib_test] *ERROR* radeon: failed to raise UVD
clocks (-110).
I've attached the full dmesg.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
https://bugzilla.kernel.org/show_bug.cgi?id=60858
Christian König <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Christian König <[email protected]> --- Does it work when you disable dpm?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #2 from Pinak <[email protected]> --- (In reply to Christian König from comment #1)
Quoted 1 line
Does it work when you disable dpm?
No, even with DPM disabled it doesn't work. Do you want a dmesg with DPM disabled?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #3 from Christian König <[email protected]> --- No, not necessary.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #4 from Christian König <[email protected]> --- Can you get me a dump of the registers, 0x0718, 0x071c and 0x0720 using radeontool?
Something like "sudo radeontool regmatch 0x0718" should do it.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #5 from Pinak <[email protected]> --- Here are the dumps of the required registers
# radeontool regmatch 0x0718 0x0718 0x20010004 (536936452)
# radeontool regmatch 0x071c 0x071c 0x021f0000 (35586048)
# radeontool regmatch 0x0720 0x0720 0x10050001 (268763137)
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #6 from Christian König <[email protected]> --- (In reply to Pinak Ahuja from comment #5)
Quoted 2 lines
# radeontool regmatch 0x071c 0x071c 0x021f0000 (35586048)
Well, that's no wonder those parameters doesn't work. Either you have a buggy BIOS or our clock calculation code has a bug, anyway I'm going to test that tomorrow with my RV710.
Anyway thanks for the info.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #7 from Pinak Ahuja <[email protected]> --- Is there anything i can do to check that my BIOS is buggy.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #8 from Christian König <[email protected]> --- You could dig into the code and try to figure out why the post dividers (vclk_div and dclk_div) turn out as 0.
The two involved functions are rv770_set_uvd_clocks which can be found here drivers/gpu/drm/radeon/rv770.c and radeon_uvd_calc_upll_dividers which can be found here drivers/gpu/drm/radeon/radeon_uvd.c.
The most interesting value is rdev->clock.spll.reference_freq, it is the reference clock frequency coming from a bios table. If that is wrong the whole calculation doesn't work any more and the UPLL generates an invalid frequency.
Insert something like DRM_ERROR("Test %d\n", rdev->clock.spll.reference_freq) into the code and see what it spits out on the next reboot.
Unfortunately I currently don't have much time to look into this and it seems to still work fine with my RV710, so it must be something special with your laptop.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #9 from Pinak Ahuja <[email protected]> --- (In reply to Christian König from comment #8)
Quoted 6 lines
You could dig into the code and try to figure out why the post dividers (
vclk_divanddclk_div) turn out as 0.The two involved functions are
rv770_set_uvd_clockswhich can be found heredrivers/gpu/drm/radeon/rv770.candradeon_uvd_calc_upll_dividerswhich can be found heredrivers/gpu/drm/radeon/radeon_uvd.c.
I'll go through the code a little later and see if i can find something useful.
Quoted 8 lines
The most interesting value is
rdev->clock.spll.reference_freq, it is the reference clock frequency coming from a bios table. If that is wrong the whole calculation doesn't work any more and the UPLL generates an invalid frequency.Insert something like
DRM_ERROR("Test %d\n", rdev->clock.spll.reference_freq)into the code and see what it spits out on the next reboot.
I did this, heres the output:
[ 8.346601] [drm:radeon_uvd_calc_upll_dividers] *ERROR* Test 2700
here's the full log:
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #10 from Christian König <[email protected]> --- Created attachment 108421
--> https://bugzilla.kernel.org/attachment.cgi?id=108421&action=edit
Possible fix.
Please try the attached patch.
It just looks like the BIOS left the UPLL in an complete invalid state. Maybe the following reset and reprogramming sequence gets us back to normal, but apart from that I'm running out of ideas how to solve this.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
Alex Deucher <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #11 from Alex Deucher <[email protected]> --- Created attachment 108461
--> https://bugzilla.kernel.org/attachment.cgi?id=108461&action=edit
print some additional information
Can you also apply this patch and attach the dmesg output? It prints some debugging info about the clock dividers.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
Pinak Ahuja <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #107431|0 |1
is obsolete| |
--- Comment #12 from Pinak Ahuja <[email protected]> --- Created attachment 108501
--> https://bugzilla.kernel.org/attachment.cgi?id=108501&action=edit
The dmesg log with extra information patch applied.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #13 from Pinak Ahuja <[email protected]> --- (In reply to Christian König from comment #10)
Quoted 8 lines
Created attachment 108421 [details]
Possible fix.Please try the attached patch.
It just looks like the BIOS left the UPLL in an complete invalid state. Maybe the following reset and reprogramming sequence gets us back to normal, but apart from that I'm running out of ideas how to solve this.
This does not make a difference, still getting the same errors.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #14 from Christian König <[email protected]> --- (In reply to Pinak Ahuja from comment #13)
Quoted 1 line
This does not make a difference, still getting the same errors.
Please provide dmesg and register dumps with this patch applied anyway.
Thanks,
Christian.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #15 from Pinak Ahuja <[email protected]> --- Created attachment 108611
--> https://bugzilla.kernel.org/attachment.cgi?id=108611&action=edit
dmesg with reset and reprogramming patch.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #16 from Pinak Ahuja <[email protected]> --- Created attachment 108621
--> https://bugzilla.kernel.org/attachment.cgi?id=108621&action=edit
register dump with reset and reprogramming patch.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #17 from Pinak Ahuja <[email protected]> ---
Would it be useful to look into the clock calculation code or is my BIOS buggy?
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
--- Comment #18 from Christian König <[email protected]> --- (In reply to Pinak Ahuja from comment #17)
Quoted 2 lines
Would it be useful to look into the clock calculation code or is my BIOS buggy?
The calculation seems to be fine, it's either your BIOS that has incorrect information or you hardware is wired somehow special.
Anyway I can't find a solution to this problem without access to the hardware, sorry.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
Pinak Ahuja <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID--- Comment #19 from Pinak Ahuja <[email protected]> ---
So it was a hardware problem and not a code problem. I cleaned my laptop and applied a little thermal paste and the issue was fixed. UVD is now working as expected.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 60858] [radeon HD 4570m] Error setting UVD clocks
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=60858
Christian König <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #20 from Christian König <[email protected]> --- Oh! That's a very interesting information, thanks allot.
We have some other people complaining about that, going to suggest that they check their hardware 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] http://lists.freedesktop.org/mailman/listinfo/dri-devel