weston/libweston/backend-drm
Leandro Ribeiro 5aea1bc522 backend-drm: do not import dmabuf buffers with no modifiers to KMS
We can't tell the layout of a buffer that has been allocated with no
modifiers. Although usually drivers use linear layouts to allocate in
these cases, it is not a rule. It can use a tiling layout, for instance,
under the hood.

So it is not safe to import a buffer with no modifiers to KMS, as it
can't tell the buffer layout and this may result in garbage being
displayed. In this patch we start to require explicit modifiers to
import buffers to KMS.

In most cases things just work as expected, but just because both sides
(display and render driver) usually end up using the linear layout when
modifiers are not exposed. It also works on systems where the display
and render devices are tied (desktops with Intel or AMD, for instance),
as there's only one driver and it knows the layout of the buffer (no
need to guess).

But in SoC's where the display and render device are split, things can
go wrong. It is better to lose performance and not break things. To
solve the problem, drivers should be updated to expose modifiers (even
if only DRM_FORMAT_MOD_LINEAR), as the concept of implicit modifiers is
the root of the problem.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2021-04-27 19:56:38 +00:00
..
drm-gbm.c backend-drm: add DRM_FORMAT_MOD_INVALID to modifier sets when no modifiers are supported 2021-04-27 19:56:38 +00:00
drm-internal.h backend-drm: start to use weston_drm_format in drm_plane 2021-04-27 19:56:38 +00:00
drm-virtual.c backend-drm: add DRM_FORMAT_MOD_INVALID to modifier sets when no modifiers are supported 2021-04-27 19:56:38 +00:00
drm.c backend-drm: add DRM_FORMAT_MOD_INVALID to modifier sets when no modifiers are supported 2021-04-27 19:56:38 +00:00
fb.c backend-drm: do not import dmabuf buffers with no modifiers to KMS 2021-04-27 19:56:38 +00:00
kms.c backend-drm: ignore formats without modifiers from IN_FORMATS 2021-04-27 19:56:38 +00:00
libbacklight.c backend-drm: move into new subdir 2019-05-16 13:32:34 +01:00
libbacklight.h backend-drm: move into new subdir 2019-05-16 13:32:34 +01:00
meson.build libweston/backend/drm: might need EGL 2020-10-26 15:44:34 +01:00
modes.c Add weston-drm-fourcc.h 2021-02-25 14:35:03 +02:00
state-helpers.c Add weston-drm-fourcc.h 2021-02-25 14:35:03 +02:00
state-propose.c backend-drm: start to use weston_drm_format in drm_plane 2021-04-27 19:56:38 +00:00
vaapi-recorder.c backend-drm: move into new subdir 2019-05-16 13:32:34 +01:00
vaapi-recorder.h backend-drm: move into new subdir 2019-05-16 13:32:34 +01:00