From: Daniel Stone Date: Thu, 12 Jul 2018 11:16:47 +0000 (+0100) Subject: compositor-drm: Remove addfb warning for user buffers X-Git-Tag: upstream/5.0.0~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48687982b55771b19b958e6a8d62794c61b2d797;p=platform%2Fupstream%2Fweston.git compositor-drm: Remove addfb warning for user buffers THe KMS AddFB call can fail for any reason at all: format/modifier not suitable, stride not aligned, allocation not contiguous, etc. If this happens with Weston's own buffers, the result is bad - no composition output. Failing AddFB from user-supplied buffers though, is not an error. The user can't necessarily allocate suitable buffers, nor does it have to. Don't spam the log with warnings when we fail on user buffers. Signed-off-by: Daniel Stone Reported-by: Pekka Paalanen Reviewed-by: Derek Foreman --- diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 704ac32..70e966c 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -1168,10 +1168,8 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf, goto err_free; } - if (drm_fb_addfb(fb) != 0) { - weston_log("failed to create kms fb: %m\n"); + if (drm_fb_addfb(fb) != 0) goto err_free; - } return fb; @@ -1242,7 +1240,8 @@ drm_fb_get_from_bo(struct gbm_bo *bo, struct drm_backend *backend, } if (drm_fb_addfb(fb) != 0) { - weston_log("failed to create kms fb: %m\n"); + if (type == BUFFER_GBM_SURFACE) + weston_log("failed to create kms fb: %m\n"); goto err_free; }