I have an embedded process that renders to a screen directly using DRM & KMS APIs. It's running on a minimal Yocto distribution (no desktop or Wayland). I would like to render to a second screen that is attached to the same GPU from another process. The first process opens '/dev/dri/card0' and becomes the de-facto DRM master and it can do drmModeSetCrtc & drmModePageFlip on the primary screen to display the framebuffer. However, if I call drmDropMaster it can't do the page flip anymore. Therefore the second process cannot become the DRM master and render to the other display using the same technique.
There's plenty of examples on how to render to one screen using the Direct Rendering Manager (DRM) and Kernel Mode Setting (KMS), but I found none that can render to a second screen from another process.
I would like to not have a master if possible once the display mode is set, but the page flip is also a restricted API. If this cannot be achieved, maybe an example on how to grant the second process permission using drmAuthMagic?