Bug 69120 - With dpm=1 vdpau is not usable
Summary: With dpm=1 vdpau is not usable
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-08 22:38 UTC by John
Modified: 2018-07-20 08:59 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg-3.11-dmp-1-two-displays.log (88.29 KB, text/plain)
2013-09-09 00:13 UTC, Dieter Nützel
no flags Details
Xorg.0.log (84.81 KB, text/plain)
2013-09-09 00:14 UTC, Dieter Nützel
no flags Details
copy of video bios (61.00 KB, application/octet-stream)
2013-09-09 00:16 UTC, Dieter Nützel
no flags Details
John's vbios (61.00 KB, application/octet-stream)
2013-09-09 04:43 UTC, John
no flags Details
John's dmesg (68.86 KB, text/plain)
2013-09-09 13:55 UTC, John
no flags Details
possible fix (2.61 KB, patch)
2013-09-10 13:44 UTC, Alex Deucher
no flags Details | Splinter Review
2-times-mplayer-konsole.png (103.50 KB, image/png)
2013-09-11 00:39 UTC, Dieter Nützel
no flags Details
2-times-mplayer-mosaic.png (2.19 MB, image/png)
2013-09-11 00:40 UTC, Dieter Nützel
no flags Details
dmesg-drm-next-3.12-AGP-dpm-1-fix-fallback-for-empty-UVD-clocks.log (90.39 KB, text/plain)
2013-09-11 00:42 UTC, Dieter Nützel
no flags Details
dmesg-drm-next-3.12-PCIE-dpm-1-fix-fallback-for-empty-UVD-clocks.log (68.84 KB, text/plain)
2013-09-11 00:43 UTC, Dieter Nützel
no flags Details
Karl's vbios (128.00 KB, application/octet-stream)
2013-10-08 20:50 UTC, Karl Miller
no flags Details
Karl's dmesg (68.36 KB, text/plain)
2013-10-08 20:54 UTC, Karl Miller
no flags Details
cedar-3.13.1-dmesg (49.66 KB, text/plain)
2014-01-30 18:39 UTC, Chris Humbert
no flags Details
cedar-3.13.1-xorg (41.72 KB, text/plain)
2014-01-30 18:41 UTC, Chris Humbert
no flags Details

Description John 2013-09-08 22:38:11 UTC
Hello,

with radeon.dpm=0 (or not set), vdpau output works very fine.
But if I switch to radeon.dpm=1 it becomes unusable.
mplayer tells me that my computer is too slow, video stutters to a crazy extent, same in xbmc.
With dpm set to 1, I am still able to watch videos "normally" if not using vdpau.

I have a Radeon 4670, Linux 3.11, Mesa 9.2 and Radeon 1:7.2.0.

I tried to change power_dpm_state and power_dpm_force_performance_level to see if it would help.
power_dpm_state stays at performance but even if I set power_dpm_force_performance_level to high, but it always reverts to auto...
This doesn't help at all...

I am not sure what else to attach.
Thank you
Comment 1 Dieter Nützel 2013-09-09 00:11:34 UTC
Hello John,

I see nearly the same with all 3.11-rcX and final plus 3.12-next.
Only diffence with dpm=0 I get partially mosaic with bigger videos (1280x720 H.264 and 1920x1080 H.264) from time to time.

But my system is much slower than yours:

poor Duron 1800 ;-)
RV730 AGP (4650)
Mesa 9.2 and git master
3.11 and 3.12-next

power_dpm_force_performance_level didn't works for me, too.

> I am not sure what else to attach.

Maybe your dmesg.log, Xorg.0.log and your vbios.

(as root)
(use lspci to get the bus id)
cd /sys/bus/pci/devices/<pci bus id>
echo 1 > rom
cat rom > /tmp/vbios.rom
echo 0 > rom

Mine comming, here.
(With dual DVI monitor configuration I got something in dmesg)
[drm:rv770_dpm_set_power_state] *ERROR* rv770_restrict_performance_levels_before_switch failed

Regards,
   Dieter
Comment 2 Dieter Nützel 2013-09-09 00:13:46 UTC
Created attachment 85467 [details]
dmesg-3.11-dmp-1-two-displays.log
Comment 3 Dieter Nützel 2013-09-09 00:14:53 UTC
Created attachment 85468 [details]
Xorg.0.log
Comment 4 Dieter Nützel 2013-09-09 00:16:09 UTC
Created attachment 85469 [details]
copy of video bios
Comment 5 Dieter Nützel 2013-09-09 00:24:57 UTC
# radeontool regmatch 0x0718
0x0718  0x20010002 (536936450)

# radeontool regmatch 0x071c
0x071c  0x021f2111 (35594513)

# radeontool regmatch 0x0720
0x0720  0x102774da (271021274)

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV730 Pro AGP [Radeon HD 4600 Series] (prog-if 00 [VGA controller])
        Subsystem: PC Partner Limited Device 0028
        Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
        Memory at c0000000 (32-bit, prefetchable) [size=256M]
        I/O ports at a800 [size=256]
        Memory at dfdf0000 (32-bit, non-prefetchable) [size=64K]
        Expansion ROM at dfdc0000 [disabled] [size=128K]
        Capabilities: [50] Power Management version 3
        Capabilities: [58] AGP version 3.0
        Kernel driver in use: radeon
Comment 6 John 2013-09-09 04:42:44 UTC
Hello Dieter,

thanks for the suggestions.
Comment 7 John 2013-09-09 04:43:24 UTC
Created attachment 85476 [details]
John's vbios
Comment 8 Alex Deucher 2013-09-09 12:40:07 UTC
Please attach your dmesg output.
Comment 9 John 2013-09-09 13:55:00 UTC
Created attachment 85496 [details]
John's dmesg
Comment 10 Alex Deucher 2013-09-10 13:44:34 UTC
Created attachment 85563 [details] [review]
possible fix

The attached patch should fix the issue.
Comment 11 John 2013-09-10 15:23:21 UTC
Hi Alex,

Thanks for the quick turn around.

Looking at the patch it seems to be for RV770 and RV780 will it still work for our older cards?

I am not home right now so I cannot test it to get the answer.
Comment 12 Alex Deucher 2013-09-10 15:31:06 UTC
(In reply to comment #11)
> Hi Alex,
> 
> Thanks for the quick turn around.
> 
> Looking at the patch it seems to be for RV770 and RV780 will it still work
> for our older cards?

Yes.  It covers the entire 7xx family of cards.
Comment 13 Dieter Nützel 2013-09-11 00:38:08 UTC
Hurray Alex,

your possible fix from Comment 10 solve it halfway or maybe  fully even on my slow Duron 1800, RV730 AGP (4650), if we separate the mosaic into a new bug entry.

The SPEED is there, now.
I can play 2 H.264 VDPAU accelerated videos (854x480 and 1280x720) simultaneously with ~35% idle rest on this little system.
Have a look at 2-times-mplayer-konsole.png attachment.

I've tested it with AGP and PCIE mode, both with same results.

The mosaic problem IS mouse cursor (hardware cursor?) related!
If the (big/fullscreen) video window coming up 'under' (over?) the mouse cursor position I get immediately mosaic. When a smaller video window starts from mouse cursor postion away UVD is excellent. Mosaic starts then not until mouse cursor move over the video window. With mplayer this could be faster reached if one seek into the video window.
See 2-times-mplayer-mosaic.png attachment.
Tested with AGP and PCIE mode.

Very nice!

-Dieter
Comment 14 Dieter Nützel 2013-09-11 00:39:48 UTC
Created attachment 85591 [details]
2-times-mplayer-konsole.png
Comment 15 Dieter Nützel 2013-09-11 00:40:49 UTC
Created attachment 85592 [details]
2-times-mplayer-mosaic.png
Comment 16 Dieter Nützel 2013-09-11 00:42:10 UTC
Created attachment 85593 [details]
dmesg-drm-next-3.12-AGP-dpm-1-fix-fallback-for-empty-UVD-clocks.log
Comment 17 Dieter Nützel 2013-09-11 00:43:08 UTC
Created attachment 85594 [details]
dmesg-drm-next-3.12-PCIE-dpm-1-fix-fallback-for-empty-UVD-clocks.log
Comment 18 Dieter Nützel 2013-09-11 01:57:36 UTC
(In reply to comment #10)
> Created attachment 85563 [details] [review] [review]
> possible fix
> 
> The attached patch should fix the issue.

Candidate for stable?

-Dieter
Comment 19 John 2013-09-11 06:36:16 UTC
I confirm the patch works here as well!

Thank you.
Comment 20 Alex Deucher 2013-09-11 13:20:02 UTC
(In reply to comment #13)
> your possible fix from Comment 10 solve it halfway or maybe  fully even on
> my slow Duron 1800, RV730 AGP (4650), if we separate the mosaic into a new
> bug entry.

That's a separate issue. Please open a different bug for that.

(In reply to comment #18)
> Candidate for stable?

Yes, the patch will go to stable.
Comment 21 Karl Miller 2013-10-08 20:50:32 UTC
Well it's still not working with my 6870.

Sometimes the Video starts fine, but most of the time it stutters with dpm enabled, and most of the time one pause is enough for the video to start stuttering again.
Comment 22 Karl Miller 2013-10-08 20:50:48 UTC
Created attachment 87301 [details]
Karl's vbios
Comment 23 Karl Miller 2013-10-08 20:54:05 UTC
Created attachment 87302 [details]
Karl's dmesg
Comment 24 Chris Humbert 2014-01-30 18:39:32 UTC
Created attachment 93075 [details]
cedar-3.13.1-dmesg

radeon.dpm=1 vdpau causes Cedar [HD 5450] to GPU lockup CP stall immediately. The player hangs with a black window.
radeon.dpm=0 vdpau works very well.

01:00.0 VGA compatible controller: [AMD/ATI] Cedar [Radeon HD 5450]
Linux 3.13.1, xf86-video-ati 7.3.0, mesa 9.5

[  107.875202] switching to power state:
[  107.875203]  ui class: none
[  107.875204]  internal class: uvd 
[  107.875206]  caps: video 
[  107.875208]  uvd    vclk: 54000 dclk: 40000
[  107.875210]          power level 0    sclk: 65000 mclk: 40000 vddc: 1070 vddci: 0
[  107.875212]          power level 1    sclk: 65000 mclk: 40000 vddc: 1070 vddci: 0
[  107.875213]          power level 2    sclk: 65000 mclk: 40000 vddc: 1070 vddci: 0
[  107.875214]  status: r 
[  108.178542] [drm:cypress_dpm_set_power_state] *ERROR* rv770_restrict_performance_levels_before_switch failed
[  118.396040] radeon 0000:01:00.0: GPU lockup CP stall for more than 10068msec
[  118.396046] radeon 0000:01:00.0: GPU lockup (waiting for 0x0000000000000004 last fence id 0x0000000000000002 on ring 5)
[  118.545687] [drm:rv770_stop_dpm] *ERROR* Could not force DPM to low.
[  118.545698] [drm] Disabling audio 0 support
[  118.698386] radeon 0000:01:00.0: GPU reset succeeded, trying to resume
Comment 25 Chris Humbert 2014-01-30 18:41:01 UTC
Created attachment 93076 [details]
cedar-3.13.1-xorg


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.