How to temporarily take control of DRM from Weston?
I'm running Weston with DRM backend on Raspberry Pi 4. Is there a way to temporarily suspend it so that I can run another program that will take control of DRM and render something, then end and give control back to Weston?
I looked through libdrm header files and found functions drmSetMaster
and drmDropMaster
but when I try to call drmSetMaster
in my program, it fails. I think Weston would have to call drmDropMaster
first or something like that.
More details about my project: I have an embedded solution running Chromium in Weston with DRM backend on Raspberry Pi 4. I also need to ocasionaly play HEVC videos and I have implemented a player for that but the problem is, I can't run the player as a Wayland client because the decoder returns dmabufs with a weird pixel format (SAND) which is not supported by Mesa yet, so I can't import it to OpenGL. The only way right now seems to be to pass dmabufs straight to DRM but I can't do that while Weston is running. I don't want to stop Weston every time so I'm looking for a solution that would simply "borrow" the control of the screen from Weston, then give it back.