Bug 84255

Summary: UVD / VDPAU not working on kaveri with VLC
Product: xorg Reporter: Richard Van Den Boom <rvdb>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Dmesg output
none
VLC log with -vvv playing a HD mkv file
none
X11 log
none
Dmesg on working Kabini system
none
X11 log on working Kabini system
none
vlc -vvv log on working Kabini system none

Description Richard Van Den Boom 2014-09-23 17:43:10 UTC
I'm running several AMD-based systems, including two with Kabini E-350 chips and one with a Kaveri A10-7700 one.
All runs a Slackware64 system, with custom built 3.16.3 kernel and libdrm, glamor, mesa and xf86-video-ati built from git pulls, dated on the 20th of september, with exact same options.
Libvdpau 0.8 is installed on all systems, compiled with the same options. vdpauinfo 0.1 is also installed, as well as x264, ffmpeg and vlc, all compiled from git pulls, dated from the same 20th of september, with the same options on all platforms.
The only differing options during compiles is that I use "-march=bdver3 -mtune=bdver3" on Kaveri while I use "-march=btver1 -mtune=btver1" on Kabini.

On Kaveri, vdpauinfo shows the following (only the begining):

**********
bash-4.3$ vdpauinfo -h
display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 YV12 
422    16384 16384  UYVY YUYV 
444    16384 16384  Y8U8V8A8 V8U8Y8A8 

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                 0  9216  2048  1152
MPEG2_SIMPLE          3  9216  2048  1152
MPEG2_MAIN            3  9216  2048  1152
H264_BASELINE        41  9216  2048  1152
H264_MAIN            41  9216  2048  1152
H264_HIGH            41  9216  2048  1152
VC1_ADVANCED          4  9216  2048  1152
MPEG4_PART2_SP        3  9216  2048  1152
MPEG4_PART2_ASP       5  9216  2048  1152

(snip)
******************

On Kabini, I have the following output :

******************

bash-4.3$ vdpauinfo 
display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 YV12 
422    16384 16384  UYVY YUYV 
444    16384 16384  Y8U8V8A8 V8U8Y8A8 

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                 0  9216  2048  1152
MPEG2_SIMPLE          3  9216  2048  1152
MPEG2_MAIN            3  9216  2048  1152
H264_BASELINE        41  9216  2048  1152
H264_MAIN            41  9216  2048  1152
H264_HIGH            41  9216  2048  1152
VC1_ADVANCED          4  9216  2048  1152
MPEG4_PART2_SP        3  9216  2048  1152
MPEG4_PART2_ASP       5  9216  2048  1152

*****************

So far so good, the capabilities of both systems seem to be identical.

I have several H264 HD1080p videos with High Main profiles, and 41 levels.
They properly play on Kabini using VLC with VDPAU. The CPU usage is low for a HD file and I can see in the vlc logs the following output :

****************

[00007f5954044cd8] vdpau_avcodec generic debug: video surface limits: 16384x16384
[00007f5954044cd8] vdpau_avcodec generic debug: decoder profile limits: level 41 mb 9216 2048x1152
[00007f5954044cd8] core generic debug: using hw decoder module "vdpau_avcodec"
[00007f5970d42768] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding.
[00007f5970d42768] avcodec decoder debug: available hardware decoder output format 109 (vdpau)
[00007f5970d42768] avcodec decoder debug: available software decoder output format 0 (yuv420p)
[00007f5954044cd8] core generic debug: looking for hw decoder module matching "any": 2 candidates
[00007f5954044cd8] vdpau_avcodec generic debug: video surface limits: 16384x16384
[00007f5954044cd8] vdpau_avcodec generic debug: decoder profile limits: level 41 mb 9216 2048x1152
[00007f5954044cd8] core generic debug: using hw decoder module "vdpau_avcodec"
[00007f5970d42768] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding.

****************

On Kaveri, this does not work. CPU usage is high and no hardware decoding seems to be used.
How is possible to debug this issue?
Comment 1 Alex Deucher 2014-09-23 17:48:39 UTC
Can you attach the dmesg output, xorg log, and vlc log from the kaveri system?
Comment 2 Richard Van Den Boom 2014-09-23 17:55:01 UTC
Created attachment 106755 [details]
Dmesg output
Comment 3 Richard Van Den Boom 2014-09-23 17:55:43 UTC
Created attachment 106756 [details]
VLC log with -vvv playing a HD mkv file
Comment 4 Richard Van Den Boom 2014-09-23 17:56:22 UTC
Created attachment 106757 [details]
X11 log
Comment 5 Richard Van Den Boom 2014-09-23 17:58:04 UTC
Here we go.
There are some weird messages in the X11 log I was not aware of.
Don't know if it's related.
Comment 6 Michel Dänzer 2014-09-24 09:34:06 UTC
(In reply to comment #3)
> VLC log with -vvv playing a HD mkv file

Can you attach this from a Kabini system as well?
Comment 7 Richard Van Den Boom 2014-09-24 09:56:19 UTC
Created attachment 106777 [details]
Dmesg on working Kabini system
Comment 8 Richard Van Den Boom 2014-09-24 09:56:55 UTC
Created attachment 106778 [details]
X11 log on working Kabini system
Comment 9 Richard Van Den Boom 2014-09-24 09:57:39 UTC
Created attachment 106779 [details]
vlc -vvv log on working Kabini system
Comment 10 Richard Van Den Boom 2014-09-24 09:58:48 UTC
I've added the logs from the working Kabini system.
The vlc log is taken while playing the same file from the same location.
Hope it helps.
Comment 11 Michel Dänzer 2014-09-24 10:04:12 UTC
The VLC log from Kabini says:

[00007f7948044cd8] core generic debug: looking for hw decoder module matching "any": 1 candidates

but the one from Kaveri says:

[00007ffb34044cd8] core generic debug: looking for hw decoder module matching "none": 1 candidates
[00007ffb34044cd8] core generic debug: no hw decoder modules matched

The "any" vs. "none" looks like a VLC configuration difference to me.
Comment 12 Richard Van Den Boom 2014-09-24 14:56:33 UTC
Indeed, reverting to default on Kaveri made it work.
I'll try to understand with the VLC guys why it was so, since VLC was normally configured to use VDPAU.
I'll close this case and mark it as INVALID.
Thanks!

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.