diff --git a/meta-oe/recipes-multimedia/mplayer/mpv/0002-hwdec_drmprime_overlay-make-the-framebuffer-the-whole-frame.patch b/meta-oe/recipes-multimedia/mplayer/mpv/0002-hwdec_drmprime_overlay-make-the-framebuffer-the-whole-frame.patch new file mode 100644 index 0000000000..577d8cfdaa --- /dev/null +++ b/meta-oe/recipes-multimedia/mplayer/mpv/0002-hwdec_drmprime_overlay-make-the-framebuffer-the-whole-frame.patch @@ -0,0 +1,24 @@ +From: Markus Volk +Subject: [PATCH] hwdec_drmprime_overlay: make the framebuffer the whole frame + +The framebuffer for the DRM plane was made the size of the source rect, +while SRC_X and SRC_Y place that rect inside the frame. As soon as the +rect does not start at the top left, with panscan or a video crop, it +reaches past the framebuffer and the atomic commit fails with ENOSPC; the +plane stays dark. Make the framebuffer the size of the frame and let the +SRC_* properties pick the part that is shown. + +Upstream-Status: Pending +--- +--- a/video/out/hwdec/hwdec_drmprime_overlay.c ++++ b/video/out/hwdec/hwdec_drmprime_overlay.c +@@ -187,7 +187,8 @@ + int dstw = MP_ALIGN_UP(p->dst.x1 - p->dst.x0, 2); + int dsth = MP_ALIGN_UP(p->dst.y1 - p->dst.y0, 2); + +- if (drm_prime_create_framebuffer(p->log, p->ctx->fd, desc, srcw, srch, &next_frame.fb, &p->handle_refs)) { ++ // The framebuffer is the whole frame, SRC_* pick the part shown ++ if (drm_prime_create_framebuffer(p->log, p->ctx->fd, desc, hw_image->w, hw_image->h, &next_frame.fb, &p->handle_refs)) { + ret = -1; + goto fail; + } diff --git a/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb b/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb index 7178182c29..f37ae4ac50 100644 --- a/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb +++ b/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb @@ -26,6 +26,7 @@ SRCREV = "41f6a645068483470267271e1d09966ca3b9f413" SRC_URI = " \ git://github.com/mpv-player/mpv;name=mpv;branch=release/${@oe.utils.trim_version('${PV}', 2)};protocol=https;tag=v${PV} \ file://0001-opengl-context-require-swap_buffers-param-for-FenceS.patch \ + file://0002-hwdec_drmprime_overlay-make-the-framebuffer-the-whole-frame.patch \ " inherit meson pkgconfig mime-xdg