libweston: drop a misleading dmabuf comment

This comment was added in 230f3b1bf8 with the
intent that if we had an information table about pixel formats (which we do
have today), we could implement more sanity checks like ensuring that width
pixels fit into stride.

Daniel Vetter said on #dri-devel IRC recently:

	< danvet> since userspace shouldn't look at stride for buffers with
	modifiers, only pass it around unchanged

I asked for clarification. It was expected that userspace would not do any kind
of sanity checks as modifiers could change everything.

Let's remove the misleading code comment so that people don't get the idea of
adding more well-intended but ill-advised sanity checks. If more checks are
added, they must take the modifier into account, which the existing checks do
not do.

After 5 years, it is far too late to remove our existing sanity checks, but we
can attempt to not cause any more damage that would restrict what people can do
in the kernel.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 5 years ago
parent 9c4b5c4931
commit 69dcd23c60
  1. 6
      libweston/linux-dmabuf.c

@ -259,12 +259,6 @@ params_create_common(struct wl_client *client,
}
}
/* XXX: Some additional sanity checks could be done with respect
* to the fourcc format. A centralized collection (kernel or
* libdrm) would be useful to avoid code duplication for these
* checks (e.g. drm_format_num_planes).
*/
if (!weston_compositor_import_dmabuf(buffer->compositor, buffer))
goto err_failed;

Loading…
Cancel
Save