Bug 39222 - VDPAU not working on RV710
Summary: VDPAU not working on RV710
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) All
: high enhancement
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 07:27 UTC by Micael Dias
Modified: 2012-09-03 07:02 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Micael Dias 2011-07-14 07:27:00 UTC
Just compiled mesa from git and mplayer2 from git:

Command line:

$ VDPAU_DRIVER=r600 mplayer -vo vdpau -vc ffh264vdpau sample_h264.mkv


Abbreviated output:

VO: [vdpau] 1920x808 => 1920x808 H.264 VDPAU acceleration 
[   vdpau] Failed creating VDPAU decoder: A catch-all error, used when no other error code applies.
FATAL: Cannot initialize video driver.
[h264_vdpau @ 0xb96a00]decoding to PIX_FMT_NONE is not supported.
[h264_vdpau @ 0xb96a00]MPV_common_init() failed.
[h264_vdpau @ 0xb96a00]decode_slice_header error
[h264_vdpau @ 0xb96a00]no frame!
Error while decoding frame!

FATAL: Could not initialize video filters (-vf) or video output (-vo).
Comment 1 Micael Dias 2011-07-14 07:28:18 UTC
Not sure if this is relevant:

$ VDPAU_DRIVER=r600 LD_LIBRARY_PATH=/usr/lib/vdpau vdpauinfo
display: :0   screen: 0
Failed to open VDPAU backend /usr/lib/vdpau/libvdpau_r600.so: undefined symbol: drmIoctl
Error creating VDPAU device: 1
Comment 2 Andy Furniss 2011-07-14 07:52:54 UTC
(In reply to comment #0)
> Just compiled mesa from git and mplayer2 from git:
> 
> Command line:
> 
> $ VDPAU_DRIVER=r600 mplayer -vo vdpau -vc ffh264vdpau sample_h264.mkv

For decode only -vc ffmpeg12vdpau is supported AFAIK.

vdpauinfo should work. If /usr/lib/vdpau actually has the newly built libs  then I guess (but don't know) you may need newer libdrm/kernel/something??
Comment 3 Micael Dias 2011-07-14 08:43:18 UTC
Oh, I didn't know only mpeg12 was available for now, sorry. I'm going to try it with a sample mpeg2 clip.

Not sure why vdpauinfo doesn't work either... I just tested with latest libdrm from git on 2.6.39.
Comment 4 Micael Dias 2011-07-14 08:52:56 UTC
Mpeg2 also not working:

VO: [vdpau] 480x480 => 480x480 MPEG2 VDPAU acceleration 
[vdpau] Error when calling vdp_presentation_queue_get_time: No backend implementation could be loaded.
FATAL: Cannot initialize video driver.
[mpegvideo_vdpau @ 0xb96a00]get_buffer() failed (-1 0 0 (nil))
Error while decoding frame!
Comment 5 Andy Furniss 2011-07-14 09:38:28 UTC
(In reply to comment #3)
> Oh, I didn't know only mpeg12 was available for now, sorry. I'm going to try it
> with a sample mpeg2 clip.
> 
> Not sure why vdpauinfo doesn't work either... I just tested with latest libdrm
> from git on 2.6.39.

I would make distclean and rebuild mesa.

If it still doesn't work try 

ldd /usr/lib/vdpau/libvdpau_r600.so

to see which libdrm.so.2 is being used eg. it may be an old one on a different path.
Comment 6 Micael Dias 2011-07-14 10:09:57 UTC
I'm on Arch Linux and using PKGBUILDs, so everything is recompiled and packages completely replaced (old files deleted).

$ ldd /usr/lib/vdpau/libvdpau_r600.so
	linux-vdso.so.1 =>  (0x00007fff7b7c6000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f0bbf4d0000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f0bbf2be000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f0bbef7e000)
	libm.so.6 => /lib/libm.so.6 (0x00007f0bbecfc000)
	libc.so.6 => /lib/libc.so.6 (0x00007f0bbe99b000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f0bbe77f000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007f0bbe57b000)
	/lib/ld-linux-x86-64.so.2 (0x00007f0bbfa05000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f0bbe379000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f0bbe173000)


Seems like it isn't linked to libdrm at all, but I'm not sure it should be. It's the first time I'm trying something with VDPAU.
Comment 7 Micael Dias 2011-07-14 10:12:13 UTC
My Mesa configure options:

./autogen.sh --prefix=/usr \
    --enable-debug \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --enable-gallium-radeon \
    --enable-gallium-r600 \
    --enable-gallium-swrast \
    --enable-glx-tls \
    --with-gallium-drivers=r300,r600,swrast \
    --with-driver=dri \
    --enable-xcb \
    --with-state-trackers=dri,glx,xvmc,vdpau \
    --disable-glut \
    --enable-gles1 \
    --enable-gles2 \
    --enable-shared-dricore \
    --enable-texture-float \
    --enable-xvmc \
    --enable-vdpau \
    --enable-gallium-g3dvl
Comment 8 Andy Furniss 2011-07-14 11:44:12 UTC
(In reply to comment #6)
> I'm on Arch Linux and using PKGBUILDs, so everything is recompiled and packages
> completely replaced (old files deleted).
> 
> $ ldd /usr/lib/vdpau/libvdpau_r600.so
>     linux-vdso.so.1 =>  (0x00007fff7b7c6000)
>     libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f0bbf4d0000)
>     libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f0bbf2be000)
>     libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f0bbef7e000)
>     libm.so.6 => /lib/libm.so.6 (0x00007f0bbecfc000)
>     libc.so.6 => /lib/libc.so.6 (0x00007f0bbe99b000)
>     libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f0bbe77f000)
>     libdl.so.2 => /lib/libdl.so.2 (0x00007f0bbe57b000)
>     /lib/ld-linux-x86-64.so.2 (0x00007f0bbfa05000)
>     libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f0bbe379000)
>     libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f0bbe173000)
> 
> 
> Seems like it isn't linked to libdrm at all, but I'm not sure it should be.
> It's the first time I'm trying something with VDPAU.

Hmm - I have no idea how Arch does things, but my ldd libvdpau_r600.so shows 

libdrm_radeon.so.1 =>
libvdpau.so.1 =>
libdrm.so.2  =>

and drmIoctl from your error is associated with libdrm.so.2.
Comment 9 Andy Furniss 2011-07-14 11:46:59 UTC
(In reply to comment #7)

>     --enable-gallium-radeon \
>     --enable-gallium-r600 \
>     --enable-gallium-swrast \

>     --with-state-trackers=dri,glx,xvmc,vdpau \

are no longer recognised with current master - but as far as I can see won't hurt and your other options seem OK.
Comment 10 Mike Lothian 2011-07-14 13:01:49 UTC
adding -ldrm to src/gallium/targets/vdpau-r600/Makefile fixes this for me
Comment 11 Micael Dias 2011-07-15 01:48:07 UTC
(In reply to comment #10)
> adding -ldrm to src/gallium/targets/vdpau-r600/Makefile fixes this for me

Also fixes vdpauinfo here.

I still can't decode mpeg2 though, same error as before.
Comment 12 Andy Furniss 2011-07-15 09:11:38 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > adding -ldrm to src/gallium/targets/vdpau-r600/Makefile fixes this for me
> 
> Also fixes vdpauinfo here.
> 
> I still can't decode mpeg2 though, same error as before.

I can't find vdp_presentation_queue_get_time in mplayer sources - so this looks like a mplayer vs mplayer2 thing.

You could probably just search the mplayer2 sources and comment out that call - or just use mplayer.

I see recent commits to master should mean you no longer have to add -ldrm manually.
Comment 13 Christian König 2011-07-15 10:17:02 UTC
The xtended timing interface that mplayer2 uses (vdp_presentation_queue_get_time) is currently not implemented.

Honestly I have only tested it on mplayer, no guarantee that's working on xine/mplayer2/...
Comment 14 Micael Dias 2011-07-15 10:25:13 UTC
(In reply to comment #13)
> The xtended timing interface that mplayer2 uses
> (vdp_presentation_queue_get_time) is currently not implemented.
> 
> Honestly I have only tested it on mplayer, no guarantee that's working on
> xine/mplayer2/...

Right, I am using mplayer2, so that must be it.
Comment 15 Andreas Boll 2012-09-01 08:43:08 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > The xtended timing interface that mplayer2 uses
> > (vdp_presentation_queue_get_time) is currently not implemented.
> > 
> > Honestly I have only tested it on mplayer, no guarantee that's working on
> > xine/mplayer2/...
> 
> Right, I am using mplayer2, so that must be it.

vdp_presentation_queue_get_time has been implemented in the meantime.

Can we close this bug?
Comment 16 Micael Dias 2012-09-03 03:58:14 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #13)
> > > The xtended timing interface that mplayer2 uses
> > > (vdp_presentation_queue_get_time) is currently not implemented.
> > > 
> > > Honestly I have only tested it on mplayer, no guarantee that's working on
> > > xine/mplayer2/...
> > 
> > Right, I am using mplayer2, so that must be it.
> 
> vdp_presentation_queue_get_time has been implemented in the meantime.
> 
> Can we close this bug?

Yes, no errors now.


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.