How to obtain a drm lease from X for overlay planes as well as a primary plane?
Daniel Vetter
daniel at ffwll.ch
Wed Aug 11 09:43:15 UTC 2021
On Tue, Aug 10, 2021 at 05:57:31PM +0100, John Cox wrote:
> Hi all
>
> I am on a Raspberry Pi, I want to display fullscreen video and have a
> couple of overlay planes to display controls / subtitles etc. The h/w
> can certainly do this. I need to be able to do this from a starting
> point where X is running.
>
> I can successfully find X's output & crtc and grab that using
> xcb_randr_create_lease and use that handle to display video. So far so
> good. But I also want to have overlay planes for subtitles etc. The
> handle I've got from the lease only seems to have a PRIMARY & a CURSOR
> plane attached so I can't get anything there.
I think X just gives you a legacy lease for the crtc, and the kernel
automatically adds the primary plane and cursor plane (if they exist) to
that lease. Unless X is patched to enable plane support and add those all
explicitly to the lease I don't think there's a way for that.
For wayland this is still in the works, so might be good if you check
there that your use-case is properly supported. Protocol MR is here:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/67
> How should I be going about getting some more planes to use for
> overlays? Pointers to documentation / examples gratefully received - so
> far my google-foo has failed to find anything that works.
>
> I'm sorry if this is the wrong place to ask, but if there is a better
> place please say and I'll go there.
>
> Many thanks
>
> John Cox
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list