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 Eugeniy.Paltsev@synopsys.com
Signed-off-by: Eugeniy Paltsev PaltsevEvgeniy@gmail.com
Edited by Eugeniy Paltsev