[PATCH v2 0/2] Add a "min bpc" connector property

From: Nicolas Frattaroli

Date: Wed Jul 29 2026 - 08:26:43 EST


This series is an alternative to the link-bpc[1] series, which
implemented an immutable property to determine the output's bit depth.
The link bpc property wasn't very liked as it'd only be updated after an
atomic commit went through. For a userspace that's trying to evaluate
all available bit depths at a certain configuration, this was untenable.

After some discussion at Display Next Hackfest 2026, the general
consensus seemed to be that a "min bpc" property would be a better way
forward. By setting it and "max bpc" to the same value, userspace can
probe for supported BPCs of a configuration with repeated atomic test
commits, without actually doing a modeset.

At the same time, it satisfies a common userspace use case: often times,
userspace just wants to ensure that its deep color plane it's submitting
is not being degraded by the driver to 8bpc for bandwidth reasons. By
setting "min bpc" accordingly, userspace will get definitive feedback
(an atomic commit failure) and can then make content-specific trade-off
decisions that the kernel wouldn't be able to do, such as by lowering
the framerate, or once "color format" is in, by subsampling the chroma.
Alternatively, userspace can of course also accept that there's really
nothing better it can do, and lower "min bpc" to accept the degradation.

This series adds the property (including documentation) and implements
it in the common HDMI state helpers (including new KUnit tests). Drivers
that don't use the common HDMI state helpers will need to register the
property and implement the (fairly simple) logic themselves.

There is a draft minimal userspace implementation in weston at [2] which
doesn't do any fancy atomic test commit probing with dynamic
userspace-side fallbacks.

[1]: https://lore.kernel.org/dri-devel/20260330-link-bpc-v6-0-ff124af93e48@xxxxxxxxxxxxx/T/
[2]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1850

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
---
Changes in v2:
- Add link to weston draft MR in cover letter
- Apply trailers
- Link to v1: https://patch.msgid.link/20260612-min-bpc-v1-0-bba88c2c4836@xxxxxxxxxxxxx

---
Nicolas Frattaroli (2):
drm/connector: Introduce "min bpc" connector property
drm/connector: hdmi: Implement "min bpc" property

drivers/gpu/drm/display/drm_hdmi_state_helper.c | 10 +-
drivers/gpu/drm/drm_atomic_helper.c | 4 +
drivers/gpu/drm/drm_atomic_uapi.c | 4 +
drivers/gpu/drm/drm_connector.c | 81 ++++++++++++
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 146 +++++++++++++++++++++
include/drm/drm_connector.h | 13 ++
6 files changed, 254 insertions(+), 4 deletions(-)
---
base-commit: 5df28e621a86e501b09902fdf816f8c02a162794
change-id: 20260605-min-bpc-dbbf3b3a2521

Best regards,
--
Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>