wlroots/backend
Simon Ser 821fb28266 backend/drm: set "max bpc" property based on pixel format
Since 1d581656c7 ("backend/drm: set "max bpc" to the max") we
set the "max bpc" property to the maximum value. The kernel driver
is supposed to clamp this value depending on hardware capabilities.

All kernel drivers lower the value depending on the GPU capabilities.
However, none of the drivers lower the value depending on the DP-MST
link capabilities. Thus, enabling a 4k@60Hz mode can fail on some
DP-MST setups due to the "max bpc" property.

Additionally, it's not a good idea to unconditionally set "max bpc"
to the max. A high bpc consumes more lanes and more clock speed,
which means higher power consumption and the busy lanes cannot be
used for something else (e.g. other data transfers on a USB-C cable).

For now, let's tie the "max bpc" to the pixel format of the buffer.
Introduce a heuristic to make "high bit-depth buffer" a synonym of
"I want the best quality".

This is not perfect: a "max bpc" higher than 8 might be desirable
for pixel formats with a color depth of 8 bits, for instance when
the color management KMS properties are used. But we don't really
support that yet, so let's leave this for later.

Closes: https://github.com/swaywm/sway/issues/7367
(cherry picked from commit d36dd96e8d)
2023-01-31 17:16:59 +01:00
..
drm backend/drm: set "max bpc" property based on pixel format 2023-01-31 17:16:59 +01:00
headless backend: use global output name counters 2022-10-13 13:12:43 +02:00
libinput backend/libinput: Fix SIGSEGV found in low-memory fuzzing 2022-09-22 13:37:32 -04:00
multi Use wl_signal_emit_mutable 2022-08-18 07:16:16 -04:00
session Use wl_signal_emit_mutable 2022-08-18 07:16:16 -04:00
wayland backend/wayland: ensure buffers are released on shutdown 2022-12-07 15:11:35 +01:00
x11 backend/x11: fix delta_discrete value 2023-01-16 14:21:15 +03:00
backend.c backend: error out when missing DRM and libinput in wlr_backend_autocreate() 2022-12-07 15:06:29 +01:00
meson.build backend: remove noop backend 2021-11-25 16:49:05 +00:00