libweston: drop a misleading dmabuf comment
authorPekka Paalanen <pekka.paalanen@collabora.com>
Thu, 14 Nov 2019 13:23:42 +0000 (15:23 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.com>
Thu, 14 Nov 2019 14:31:33 +0000 (16:31 +0200)
commit69dcd23c6091420d42ec2ed021c2e6f379217a25
tree482f90425fc7a25d4d03d9125607f901df5d439c
parent9c4b5c493161780b301877de6f96316ecf9b4e93
libweston: drop a misleading dmabuf comment

This comment was added in 230f3b1bf896fcf3fa76b4d7093122b3361f7e36 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>
libweston/linux-dmabuf.c