How to obtain a drm lease from X for overlay planes as well as a primary plane?
John Cox
jc at kynesim.co.uk
Wed Aug 11 10:19:56 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.
Bother. So near and yet so far. Thanks for the info.
>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
In overall protocol terms that doesn't seem so different from what X
does and I am far too inexperienced in Wayland / DRM to understand the
subtleties. That MR seems to be done so is probably an inappropriate
place to ask - where would you recommend as an appropriate forum?
Many thanks
John Cox
>> 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
More information about the dri-devel
mailing list