Summary: | VDPAU videos don't start playing with r600 gallium driver | ||
---|---|---|---|
Product: | Mesa | Reporter: | joeri.exelmans |
Component: | Drivers/Gallium/r600 | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | Default DRI bug account <dri-devel> |
Severity: | normal | ||
Priority: | medium | CC: | mirh |
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
mpv verbose output till the point where the application becomes unresponsive
vdpauinfo latest mpv (from git) verbose output - same problem possible fix |
Mesa or the kernel is more likely. Created attachment 131645 [details]
vdpauinfo
Wasn't aware that Mesa offered both a VDPAU and a VAAPI driver. mpv + VAAPI works fine, mpv + VDPAU is broken. mpv 0.14.0 (C) 2000-2015 Does it work with current mpv? Created attachment 131648 [details]
latest mpv (from git) verbose output - same problem
Same problem with latest mpv from git. Video never starts.
(In reply to joeri.exelmans from comment #5) > Created attachment 131648 [details] > latest mpv (from git) verbose output - same problem > > Same problem with latest mpv from git. Video never starts. OK, that's me out of ideas. I can't reproduce this on my R9 285 card. FWIW with current ffmpeg, vaapi is not a good workaround as it will eventually use all memory. Older ffmpeg won't. I used this guide (https://pkg-xorg.alioth.debian.org/howto/build-mesa.html) to build the mesa project with git version 84012262ea70435507d3b88ddbc0f621781ec275 (Mar 21 2017), and I can use VDPAU again in Kodi. The configure command that I used: ./configure --enable-vdpau --enable-va --with-gallium-drivers=r600 --with-dri-drivers=radeon --enable-llvm --enable-dri3 --with-llvm-prefix=/usr/lib/llvm-4.0 --enable-gles1 --enable-gles2 --enable-glx-tls The environment variables when running Kodi: export LIBGL_DRIVERS_PATH=lib export LD_LIBRARY_PATH=lib export VDPAU_DRIVER_PATH=lib (lib being in the mesa git project dir) So Kodi works, VLC already worked, but mpv is still broken. The movie starts playing (cause I can hear the audio), which is an improvement, but the player window is entirely blue + a lot of opengl errors in stdout. Maybe because old mesa + new mpv is a bad idea, or maybe I did something wrong building mesa. I'll continue to search for the specific commit that broke VDPAU in Kodi. I have this same problem but in r600g since 2017-05-17, my report in mpv: https://github.com/mpv-player/mpv/issues/4433 In my case, the issue only manifest using: 'mpv --vo=opengl --hwdec=vdpau' I think this other issue is also related: https://github.com/mpv-player/mpv/issues/4430 Interesting, probably a bug in the r600 gallium driver then. Mpv with --hwdec=vdpau-copy (instead of --hwdec=vdpau) seems to work for me as well. Maybe VLC also uses that method. So far I've built Mesa git versions 84012262ea70435507d3b88ddbc0f621781ec275 (Tue Mar 21 23:15:05 2017 +0100) 566f2ed5716297ce60ca10c57aeddc406835c430 (Fri Apr 14 23:39:15 2017 +0200) 9db9b2e8cd0a0d250c6251a2fef17198616519e7 (Wed May 3 18:37:28 2017 +0200) and they all work with Kodi and VDPAU. The blue screen in mpv could be a bug in mpv 0.25 or Mesa still. My guess is mpv because never had that problem with mpv 0.14 from Ubuntu repository. Edited summary, changed component Drivers/Gallium/radeonsi -> Drivers/Gallium/r600 I use mpv 0.25.0-9-g18703b55d until an update of padoka PPA broke vdpau. After that I have been recompiling ffmpeg and mpv regularly to see if any updates fix the issue, but so far all the results have been unfruitful. I even did some downgrades to mpv, but I also did not succeed. The only thing that I not tried is to use an older version of ffmpeg compiled with the old vdpau API (--enable-gpl --enable-version3) with an mpv version prior to this: https://github.com/mpv-player/mpv/commit/f59371de2170141fc28540d03c4e7ecc62844ebf Okay, I found the (series of) commits that break VDPAU in Kodi and mpv. They were added to the master branch on 2017-05-15 11:01:33 (GMT), all authored by Marek Olšák <marek.olsak@amd.com>. This is the last commit that works: https://cgit.freedesktop.org/mesa/mesa/commit/?id=42fe45b45161e9c9d714436923e88e46fdb3614a Summary: gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region Next there are a number of commits, all by Marek Olšák that won't compile because an include is missing: https://cgit.freedesktop.org/mesa/mesa/commit/?id=8b5485957e19287f7e694e7e87eed784c44bb1e2 Summary: gallium/radeon: unwrap a context if we get a wrapped one https://cgit.freedesktop.org/mesa/mesa/commit/?id=e11f7e1d5996532228c6494ff9e93431c5506ef5 Summary: gallium/radeon: handle TC_TRANSFER_MAP_THREADED_UNSYNC https://cgit.freedesktop.org/mesa/mesa/commit/?id=93d549b2af84158f25842fd08b5882b041b33f62 Summary: gallium/radeon: handle other map buffer flags from the threaded context The next commit fixes the missing include and hence compiles, but has the bug that this thread is about: https://cgit.freedesktop.org/mesa/mesa/commit/?id=b4fc399c088f77a8e426742707c9566505f1b7dd Summary: gallium/radeon: subclass threaded_resource Created attachment 131771 [details] [review] possible fix Can you try this patch? With the patch, VDPAU works again. Is it a fix or does it simply disable a feature? It's the real fix. 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.
Created attachment 131606 [details] mpv verbose output till the point where the application becomes unresponsive Hardware: AMD Fusion E-450 (PALM) Driver version (xf86-video-ati): 1:7.9.99+git1705240733.d80d01~gd~x Playing a video in mpv with the '--hwdec=vdpau' option, the player window is created but the application becomes unresponsive and the video never starts. Similarly in Kodi, playing a video with VDPAU enabled causes Kodi to become unresponsive to user input and the video never starts. Strangely, VLC can still play videos with VDPAU enabled. I'm automatically getting the latest git updates through the Oibaf Ubuntu PPA. The problem first occurred somewhere in March or April, when VDPAU videos /sometimes/ wouldn't start or took a long time to start (as opposed to the current situation where videos no longer start at all) and going back to the much older Ubuntu 'stock' driver solves the problem. I'm not sure if it's a bug in the xf86-video-ati driver or some other component. If someone can tell me which component is likely to cause the problem, I can track the git commit that started the problem.