On 2018-07-12 06:16 AM, Daniel Stone wrote:
> 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 <[email protected]>
> Reported-by: Pekka Paalanen <[email protected]>

Reviewed-by: Derek Foreman <[email protected]>

And I'm going to land it just before I make the release shortly. Not a
high priority bug fix, but nobody likes irrelevant log spam.

> ---
>  libweston/compositor-drm.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index 95b379740..f57be6265 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -1184,10 +1184,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;
>  
> @@ -1258,7 +1256,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;
>       }
>  
> 

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to