You need to look into the long-term technical direction that LE is taking with Kodi (and Kodi on Linux is adopting) and then use a mainline Amlogic kernel with a few patches (as changes are still working their way upstream) to have a proper DRM/KMS environment that will support GBM/V4L2 or GBM/Wayland. The code pieces for this are available and working today (not flawless, but useable). Qt also has GBM/V4L2 support written by one of our team members so that Plex (a Qt app) can use the same GBM/V4L2 environment for their embedded distro that is based upon LE's codebase. In the long-term (LE 10.0) Raspberry Pi will also switch to GBM/V4L2 using the open-source VC4 (V3D) drivers.
The amlogic branch in my GitHub repo is rebased frequently but should give you a working mainline codebase to work from. If you compare that branch with the amlogic-meson-mali package in older 4.17 and 4.16 branches you can see how to build it with Wayland support; I dropped the Wayland dependency recently as Amlogic started shipping a GBM 'dummy' file (at my request) that doesn't require it in the latest buildroot.
IMHO any major development needs to use the modern frameworks that are now in-place and your project will not have to reinvent the wheel when we drop support for older BSP kernels in the near future. All major work done against vendor BSP kernels is a wrong move.