From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Xaver Hugl" <xaver.hugl@kde.org>,
"Michel Dänzer" <michel.daenzer@mailbox.org>,
"Harry Wentland" <harry.wentland@amd.com>,
"Mario Kleiner" <mario.kleiner.de@gmail.com>,
"Pekka Paalanen" <pekka.paalanen@collabora.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Daniel Stone" <daniel@fooishbar.org>,
"Marius Vlad" <marius.vlad@collabora.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel@collabora.com, wayland-devel@lists.freedesktop.org,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Subject: [PATCH v2 0/2] Add a "min bpc" connector property
Date: Wed, 29 Jul 2026 14:13:26 +0200 [thread overview]
Message-ID: <20260729-min-bpc-v2-0-7d0036ef437c@collabora.com> (raw)
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>
next reply other threads:[~2026-07-29 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 12:13 Nicolas Frattaroli [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729-min-bpc-v2-0-7d0036ef437c@collabora.com \
--to=nicolas.frattaroli@collabora.com \
--cc=airlied@gmail.com \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mario.kleiner.de@gmail.com \
--cc=marius.vlad@collabora.com \
--cc=michel.daenzer@mailbox.org \
--cc=mripard@kernel.org \
--cc=pekka.paalanen@collabora.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=ville.syrjala@linux.intel.com \
--cc=wayland-devel@lists.freedesktop.org \
--cc=xaver.hugl@kde.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®