Bug 81579 - VDPAU: videos slow to a crawl when more than 1 video is playing
Summary: VDPAU: videos slow to a crawl when more than 1 video is playing
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: 10.2
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-20 23:30 UTC by joaoboia
Modified: 2014-07-21 13:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg (96.40 KB, text/plain)
2014-07-21 11:39 UTC, joaoboia
Details

Description joaoboia 2014-07-20 23:30:55 UTC
If you try to view more than one video using hardware decoding videos will slow down and become unwatchable. 

For example when try use two VLC instances playing different videos or one video on VLC and one on XBMC or one video on XBMC and another on Firefox.

Not sure if there's an actual hardware limitation on this or not. If it is a limitation of the hardware, it should deny access to the application so it can revert to software decoding.
Comment 1 Grigori Goronzy 2014-07-21 00:21:04 UTC
There is no particular hardware limitation - multiple concurrent UVD contexts are supported. This worked for me not long ago. Unless you try to play multiple 1080p60 videos at the same time or something like that, performance should be adequate. I'm not really sure if it is reasonably possible to catch these cases.

Do you have trouble with concurrent UVD usage regardless of video codec and profile? E.g. does it also happen if you try to play two rather low-res, low-fps videos at the same time?
Comment 2 joaoboia 2014-07-21 00:37:02 UTC
It's mainly if you have two 1080p videos at 30FPS, with one at 1080p and one at 720p video it plays fine with no slowdowns.
Comment 3 Christian König 2014-07-21 07:58:23 UTC
That just sounds like your hardware is to slow to handle two 1080p videos. What hardware are you using?

Apart from that falling back to software decoding if the hardware decoding capacity is used up is job of the media player application. Denying decoding if we already have a stream playing would just result in an black screen.
Comment 4 joaoboia 2014-07-21 11:07:08 UTC
(In reply to comment #3)
> That just sounds like your hardware is to slow to handle two 1080p videos.
> What hardware are you using?
> 
> Apart from that falling back to software decoding if the hardware decoding
> capacity is used up is job of the media player application. Denying decoding
> if we already have a stream playing would just result in an black screen.

It's a HD4770, it would be UVD 2.2 I think.
Comment 5 Christian König 2014-07-21 11:18:47 UTC
Please provide your full dmesg with dpm enabled, but that sounds like your card just doesn't have enough power for two 1080p streams.
Comment 6 joaoboia 2014-07-21 11:39:24 UTC
Created attachment 103186 [details]
dmesg
Comment 7 Christian König 2014-07-21 13:47:33 UTC
>[    1.093019] == power state 2 ==
>[    1.093019] 	ui class: none
>[    1.093020] 	internal class: uvd 
>[    1.093021] 	caps: video 
>[    1.093022] 	uvd    vclk: 48000 dclk: 38000
>[    1.093023] 		power level 0    sclk: 50000 mclk: 80000 vddc: 1000
>[    1.093024] 		power level 1    sclk: 50000 mclk: 80000 vddc: 1000
>[    1.093025] 		power level 2    sclk: 50000 mclk: 80000 vddc: 1000

The power table indeed has only a single UVD performance level and that doesn't looks like it is suitable for handling two 1080p streams at the same time.

You need at least a vclk of 533Mhz and a dclk of 400Mhz for that. You can try to hack into the kernel and overclock the UVD block, but I don't advise to do so. OEMs usually have a good reason for limiting the clocks to a lower level.

Anyway that's clearly not a driver bug, cause the kernel does what it is supposed to do.


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.