Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpv ignores whether a dma-buf format is advertised or not #7516

Closed
jadahl opened this issue Mar 9, 2020 · 10 comments
Closed

mpv ignores whether a dma-buf format is advertised or not #7516

jadahl opened this issue Mar 9, 2020 · 10 comments

Comments

@jadahl
Copy link

jadahl commented Mar 9, 2020

Important Information

  • mpv version: 0.32.0
  • Linux Distribution and Version: Fedora 32
  • Source of the mpv binary: Fedora repositories
  • Window Manager and version: GNOME 3.36
  • GPU driver and version: Intel (Linux 5.6.0, mesa 2.0.1)

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

  1. Play video

Result:

[destroyed object]: error 7: failed to import supplied dmabufs: Unsupported buffer format 808669784

Some initial debug shows mpv is not compliant:

Compositor advertises the following dma-buf formats:

[2517914.764] zwp_linux_dmabuf_v1@17.format(875713089)
[2517914.770] zwp_linux_dmabuf_v1@17.modifier(875713089, 0, 0)
[2517914.783] zwp_linux_dmabuf_v1@17.modifier(875713089, 16777216, 1)
[2517914.797] zwp_linux_dmabuf_v1@17.modifier(875713089, 16777216, 2)
[2517914.810] zwp_linux_dmabuf_v1@17.modifier(875713089, 16777216, 4)
[2517914.823] zwp_linux_dmabuf_v1@17.format(875713112)
[2517914.830] zwp_linux_dmabuf_v1@17.modifier(875713112, 0, 0)
[2517914.843] zwp_linux_dmabuf_v1@17.modifier(875713112, 16777216, 1)
[2517914.857] zwp_linux_dmabuf_v1@17.modifier(875713112, 16777216, 2)
[2517914.873] zwp_linux_dmabuf_v1@17.modifier(875713112, 16777216, 4)
[2517914.896] zwp_linux_dmabuf_v1@17.format(808669761)
[2517914.911] zwp_linux_dmabuf_v1@17.modifier(808669761, 0, 0)
[2517914.932] zwp_linux_dmabuf_v1@17.modifier(808669761, 16777216, 1)
[2517914.951] zwp_linux_dmabuf_v1@17.modifier(808669761, 16777216, 2)
[2517914.973] zwp_linux_dmabuf_v1@17.format(909199186)
[2517914.984] zwp_linux_dmabuf_v1@17.modifier(909199186, 0, 0)
[2517915.001] zwp_linux_dmabuf_v1@17.modifier(909199186, 16777216, 1)
[2517915.055] zwp_linux_dmabuf_v1@17.modifier(909199186, 16777216, 2)

mpv then creates a buffer with another format

[2518099.372]  -> zwp_linux_buffer_params_v1@21.create_immed(new id wl_buffer@22, 1920, 1080, 808669784, 0)

which is a violation of the protocol in question.

@jadahl jadahl added the os:linux label Mar 9, 2020
@Dudemanguy
Copy link
Member

Hmm, gave this a whirl on GNOME 3.36 (also Intel) and it detected and picked 875713112 for me. This might be tricky to reproduce.

@jadahl
Copy link
Author

jadahl commented Mar 24, 2020

FWIW, this could be a bug in mesa: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4294

@r3b311i0n
Copy link

I'm getting the same error using Arch Linux with GNOME 3.36.1 and mesa 20.0.2. Downgrading mesa to 19.3.4 fixes it for me.

@Dudemanguy
Copy link
Member

Dudemanguy commented Mar 31, 2020

Still works for me with mesa 20.0.2, but maybe I'm just lucky. Probably safe to consider this one a Mesa bug for now though.

Edit: Ah, my test is on i965 and not the new Iris driver (my hardware is way too old to use Iris). I bet that's the cause.

@r3b311i0n
Copy link

Yup. Forcing the old driver by using MESA_LOADER_DRIVER_OVERRIDE=i965 fixes the issue.

@thedemz
Copy link

thedemz commented Apr 1, 2020

I'm getting the same error using Arch Linux with GNOME 3.36.1 and mesa 20.0.2. Downgrading mesa to 19.3.4 fixes it for me.

Same

@terzievk
Copy link

terzievk commented Apr 2, 2020

I'm getting the same error using Arch Linux with GNOME 3.36.1 and mesa 20.0.2. Downgrading mesa to 19.3.4 fixes it for me.

Same

same

@jadahl
Copy link
Author

jadahl commented Apr 14, 2020

and where will it be fixed?

It should be fixed by the linked mesa merge request.

@Dudemanguy
Copy link
Member

The mesa MR was merged so that should fix this one. Feel free to reopen if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@jadahl @thedemz @Dudemanguy @r3b311i0n @terzievk and others