libweston: add initial dma-buf feedback implementation

This adds the initial dma-buf feedback implementation, following the
changes in the dma-buf protocol extension.

The initial dma-buf feedback implementation gives support to send
default feedback and per-surface feedback. For now the per-surface
feedback support is very basic and is still not implemented in the
DRM-backend, what basically means that KMS plane's formats/modifiers are
not being exposed to clients. In the next commits of this series we add
the DRM-backend implementation.

This patch is based on previous work of Scott Anderson (@ascent).

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Leandro Ribeiro
2021-01-18 19:36:48 -03:00
parent 18f53ab2d4
commit 8eb8414fcd
5 changed files with 565 additions and 12 deletions
+7
View File
@@ -1054,6 +1054,8 @@ struct weston_desktop_xwayland;
struct weston_desktop_xwayland_interface;
struct weston_debug_compositor;
struct weston_color_manager;
struct weston_dmabuf_feedback;
struct weston_dmabuf_feedback_format_table;
/** Main object, container-like structure which aggregates all other objects.
*
@@ -1129,6 +1131,9 @@ struct weston_compositor {
struct weston_backend *backend;
struct weston_launcher *launcher;
struct weston_dmabuf_feedback *default_dmabuf_feedback;
struct weston_dmabuf_feedback_format_table *dmabuf_feedback_format_table;
struct wl_list plugin_api_list; /* struct weston_plugin_api::link */
uint32_t output_id_pool;
@@ -1538,6 +1543,8 @@ struct weston_surface {
int acquire_fence_fd;
struct weston_buffer_release_reference buffer_release_ref;
struct weston_dmabuf_feedback *dmabuf_feedback;
enum weston_hdcp_protection desired_protection;
enum weston_hdcp_protection current_protection;
enum weston_surface_protection_mode protection_mode;