Skip to content

Use DRM iterators in the drm-backend

drm-backend: stop parsing IN_FORMATS blobs, use libdrm instead

Before this change the drm-backend in Weston did the work of parsing DRM blobs in order to query IN_FORMATS data, if available. This is also the case for other DRM/KMS clients that use IN_FORMATS (i.e. X).

libdrm 2.4.108 with e641e2a6 ("xf86drm: add iterator API for DRM/KMS IN_FORMATS blobs") introduced a dedicated API for querying IN_FORMATS data.

Bump the minimum required version to 2.4.108, stop parsing IN_FORMATS in Weston and start using DRM iterators. In addition, remove fallback code for libdrm <2.4.107.

In order to use DRM iterators we need to bump the minimum required version of libdrm to 2.4.108 and consequently handle it in the CI cycle. At the moment we use Debian 11, which comes with libdrm 2.4.104, so like for other dependencies build it from source.

Last, drop all now outdated code conditional to earlier versions of libdrm.

Edited by Luigi Santivetti

Merge request reports