mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-15 19:59:02 +00:00
5aea1bc522
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> |
||
---|---|---|
.. | ||
drm-gbm.c | ||
drm-internal.h | ||
drm-virtual.c | ||
drm.c | ||
fb.c | ||
kms.c | ||
libbacklight.c | ||
libbacklight.h | ||
meson.build | ||
modes.c | ||
state-helpers.c | ||
state-propose.c | ||
vaapi-recorder.c | ||
vaapi-recorder.h |