Skip to content

RFC: vrend: align with new minigbm versioning and use gbm_bo_get_map_info()

Ryan Neph requested to merge ryanneph/virglrenderer:rn-get-gbm-map-info into main

Minigbm now advertises its version consistently in its pkgconfig file and its header. With this unification, its version is set to 1.1.0.

It is safe to lower the meson dependency version from 18.0.0 to 1.1.0 before the corresponding change lands on the minigbm side, because mesa still advertises 1.0.0 and we only check if the advertised version is >= our dependency version. However, landing the minigbm-side change first would break the virglrenderer build.

I think this is long-overdue, so I'm okay with imposing a bit of manual integrator effort to get things sorted out.

With the new versioning, we can try to use the new minigbm API to get caching mode for gbm_bos when it is available (detected at compile-time) or fall back to the inferred (old) way if not.

Signed-off-by: Ryan Neph ryanneph@google.com


I've roughly considered the procedure to be followed by integrators (if there are any other than ChromeOS that rely on -Dminigbm_allocation=true...) would be:

  1. uprev virglrenderer with this MR
    • Then virglrenderer can link to old (pkgconfig version 18.0.0) or new (pkgconfig version 1.1.0) minigbm
    • Still builds without the new minigbm-only gbm_bo_get_map_info() API
  2. uprev minigbm to set its advertised version (both pkgconfig and dynamic lib naming convention) to 1.1.0, which includes gbm_bo_get_map_info() API
    • vrend now uses gbm_bo_get_map_info() because the referenced gbm.h has the distinguishing info + version to indicate support.

If folks don't see an issue with that plan, I would wait ~2 weeks between (1) and (2) to try to reduce the manual effort required.

The Minigbm parts are at https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5513264

/cc @gerddie @zzyiwei @dawnhan @justonli

Merge request reports