All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add a "min bpc" connector property
@ 2026-07-29 12:13 Nicolas Frattaroli
  2026-07-29 12:13 ` [PATCH v2 1/2] drm/connector: Introduce " Nicolas Frattaroli
  2026-07-29 12:13 ` [PATCH v2 2/2] drm/connector: hdmi: Implement "min bpc" property Nicolas Frattaroli
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Frattaroli @ 2026-07-29 12:13 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Xaver Hugl, Michel Dänzer, Harry Wentland,
	Mario Kleiner, Pekka Paalanen, Ville Syrjälä,
	Daniel Stone, Marius Vlad
  Cc: dri-devel, linux-kernel, kernel, wayland-devel,
	Nicolas Frattaroli

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@collabora.com/T/
[2]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1850

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
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@collabora.com

---
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@collabora.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-29 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 12:13 [PATCH v2 0/2] Add a "min bpc" connector property Nicolas Frattaroli
2026-07-29 12:13 ` [PATCH v2 1/2] drm/connector: Introduce " Nicolas Frattaroli
2026-07-29 12:25   ` sashiko-bot
2026-07-29 12:13 ` [PATCH v2 2/2] drm/connector: hdmi: Implement "min bpc" property Nicolas Frattaroli
2026-07-29 12:23   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.