linux-dmabuf: send protocol error on invalid format/modifier

Now that compositors must send INVALID to advertise support for
implicit modifiers, we can make it a protocol error to add a
DMA-BUF plane with an unsupported format + modifier pair.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Simon Ser 2021-09-27 11:13:39 +02:00
parent 8a5cd28a0e
commit c62be976d7

View file

@ -247,10 +247,8 @@
compression, etc. driver-specific modifications to the base format compression, etc. driver-specific modifications to the base format
defined by the DRM fourcc code. defined by the DRM fourcc code.
Warning: It should be an error if the format/modifier pair was not Starting from version 4, the invalid_format protocol error is sent if
advertised by zwp_linux_dmabuf_feedback_v1. This is not enforced yet the format + modifier pair was not advertised as supported.
because some implementations always accept DRM_FORMAT_MOD_INVALID. Also
version 2 of this protocol does not have the modifier event.
This request raises the PLANE_IDX error if plane_idx is too large. This request raises the PLANE_IDX error if plane_idx is too large.
The error PLANE_SET is raised if attempting to set a plane that The error PLANE_SET is raised if attempting to set a plane that