protocol: add linux_dmabuf extension (v3)
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 29 Sep 2014 18:08:29 +0000 (14:08 -0400)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 14 Aug 2015 12:49:53 +0000 (15:49 +0300)
commit23ab7159d200883cc0d21db8dc4efdd58e2d60a7
treee5a0cad32030888c0776785eaca2b56582d2cb10
parentf3c83363200fd335f37119cb1d238b0e47fd4299
protocol: add linux_dmabuf extension (v3)

An experimental (hence the 'z' prefix) linux_dmabuf Wayland protocol
extension for creating dmabuf-based wl_buffers in a generic manner.

This does not include proper dmabuf metadata negotiation because
there is no way to communicate all dmabuf constraints from the
compositor to a client before-hand. The client has to create a
wl_buffer wrapping one or more dmabuf buffers and then listen at
the feedback object returned to know if the operation was successful.

RFCv1 changes (after a first draft without code):
- some renames of interfaces and argument, no semantic changes
- added destructor protocol to dmabuf_batch
- added feedback interface for buffer creation

v2 changes:
- use drm_fourcc.h as authoritative source for format codes
- add support for the 64-bit layout qualifier and y-inverted dmabufs
- simplify the 'add' request (no need to preserve fd numerical id)
- add explicit plane index in the 'add' request
- integrate the 'feedback' object events to the batch interface
- rename 'create_buffer' to 'create' and move it into the batch interface
- add requirements needed from the graphics stack and clients
- improve existing errors and add batch error codes
- removed error codes from the global interface
- improve documentation for arguments, enums, etc.
- rename dmabuf_batch to zlinux_buffer_params
- The y-inverted property makes more sense as a whole buffer property.
  Y-flipping individual planes of the same buffer object is hardly useful.
  The y-invert is also converted into a flag, so we may add more flags
  later.
- add flags for interlaced buffer content

v3 changes:
- Apply Daniel Vetter's comments about wording on coherency.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Makefile.am
protocol/linux-dmabuf.xml [new file with mode: 0644]