backend/drm: Don't fail on failing to find overlay format

Some hardware exists which doesn't support XRGB/ARGB overlays, and we
aren't even using overlay planes, so don't fail on trying to find a
format.
This commit is contained in:
Scott Anderson 2019-03-06 10:49:59 +13:00 committed by emersion
parent 680c4c573c
commit 6a8f17b5f6
1 changed files with 4 additions and 1 deletions

View File

@ -133,7 +133,10 @@ static bool init_planes(struct wlr_drm_backend *drm) {
rgb_format = fmt; rgb_format = fmt;
} }
} }
if (rgb_format == DRM_FORMAT_INVALID) { // Some overlays exist which don't support XRGB8888/ARGB8888
// We aren't even using overlay planes currently, so don't fail
// on something unnecessary.
if (type != DRM_PLANE_TYPE_OVERLAY && rgb_format == DRM_FORMAT_INVALID) {
wlr_log(WLR_ERROR, "Failed to find an RGB format for plane %zu", i); wlr_log(WLR_ERROR, "Failed to find an RGB format for plane %zu", i);
drmModeFreePlane(plane); drmModeFreePlane(plane);
goto error_planes; goto error_planes;