compositor-drm: check capabilities before gbm modifiers setup

Commit 244244d1 ("compositor-drm: Use GBM modifier API")
force using of fb modifiers without runtime check.

As some modeset drivers don't support fb modifiers that
may lead to following error during weston initialization:
failed to create kms fb: No such file or directory
failed to get drm_fb for bo

Fix it by checking DRM_CAP_ADDFB2_MODIFIERS capability and rollback
to legacy (non gbm modifiers) codepath if required.

Fixes: 244244d1 ("compositor-drm: Use GBM modifier API")
Signed-off-by: Eugeniy Paltsev <>
Signed-off-by: Eugeniy Paltsev <>
1 job for gbm-modifiers-fix--5.0.0-f709d220 in 4 minutes and 31 seconds (queued for 3 seconds)
Status Job ID Name Coverage
passed #37119