Skip to content

meson build and libdrm/minigbm integration #1

@99degree

Description

@99degree

Hi gentleman,

I know it might be crazy to voice this out. Here is the reason.

Few nitches on real world AOSP custom rom:

  • Very cumbersome to build Mesa gbm with meson for cross compile out-of-tree, pkgconfig related etc.
  • Really out of support for those dedicate hardware backend from user point of view
  • Wanted to use AOSP/LineageOS rom with both mainline/vendor kernel but not able to build a custom ROM.

Some bright things:

  • Great support from minigbm
  • Compatible between gbm and minigbm api, and subsitude possible.
  • Many more format and/or modifier support from minigbm
  • Very simple layering for aidl and stable-c gralloc/mapper for compile.

Yet to have:

  • Minigbm and gralloc_gbm_mesa both not yet support meson
  • Might have some extensive format/modifier support from minigbm with simply add to existing format modifier switch code.
  • Possible code license issue to link gralloc_mesa_gbm with libdrm and minigbm altogether, yet to clear this out.
  • Eventually mapper5 stable-c will be independent of aidl and entire framework in future.

To tackle above, I had written a draft version of meson build for both gralloc_mesa_gbm and minigbm, wrap file for libdrm and minigbm.

Now with goodies:

  • A new meson build system to both minigbm and gralloc_mesa_gbm
  • Compile/cross-build fine on gralloc_mesa_gbm with subproject of minigbm and libdrm, as a single so lib, ready for fast test with OS
  • out-of-tree build for aidl; stable-c mapper module is the next item.
  • Compile pass for stable-c mapper5 within minigbm, should be relatively easy to get it done with gralloc_mesa_gbm's
  • Independent of bulky soong build system

Not as good as we expected:

  • Stucked with vndk v34 and stable-c mapper_v5 api

I have doubt on below:

  • Above said license problem between minigbm/libdrm/gralloc_mesa_gbm link altogether.
  • Redistribute of binary code for license compilance.
  • Dont know if I collect source files from aosp (vndk) and distribute with gralloc_mesa_gbm, might or not violate license.
  • Test bed is still under gone setup. No result to prove anything atm.
  • The license of gralloc_mesa_gbm in my side is unclear.

I hope

  • Would you add a license file to the project?
  • Benefit for people long waiting for oot cross build.
  • Can have more use case for the project
  • Can have a better support for extened formats modifiers, easily by replacing minigbm.
  • Interoperatibility of Mesa Vulkan turnip, angle, gralloc_mesa_gbm, minigbm thus graphic full stack.

I also find Mesa vulkan turnip loaded but not yet fonctioning atm, If you wanna to have a try for other hardware device, below is a github repo action for fork and modify:

Changes are being released in below repo:
https://github.com/99degree/minigbm/
https://github.com/99degree/gralloc_gbm_mesa/
https://github.com/99degree/android-mesa-build/actions/

Please feel free to let me know if you have concern/interested about this. Once I know of any, and will take approprate action to compliant with license on all above said projects. Thanks for your great gralloc/mapper code.

Regards,
George

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions