libweston: Add the ability to determine if a dmabuf is scanout-capable
authorMarius Vlad <marius.vlad@collabora.com>
Sat, 16 Nov 2019 18:26:52 +0000 (20:26 +0200)
committerMarius Vlad <marius.vlad@collabora.com>
Thu, 21 Nov 2019 11:54:50 +0000 (13:54 +0200)
commit5a701547a45df414b25addac0709f68087117e32
tree33369d20133aa3307b57bbd3126c3cb83337b3b4
parentebd10e512e2243c779a228437572c0155fad058b
libweston: Add the ability to determine if a dmabuf is scanout-capable

Adds a new callback 'can_scanout_dmabuf' in weston_backend, which
can be set by the back-end do determine if the buffer supplied can be
imported directly by KMS.

This patch adds a wrapper over it, 'weston_compositor_dmabuf_can_scanout'
which is called before importing the dmabuf in the GPU if the
direct_display dmabuf is being set. If that's true and the check
failed, we refuse to create a wl_buffer.

This patch avoids importing in the GPU.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
libweston/backend.h
libweston/compositor.c
libweston/libweston-internal.h
libweston/linux-dmabuf.c