mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>
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 0/2] Add a "min bpc" connector property
Date: Fri, 12 Jun 2026 17:34:11 +0200	[thread overview]
Message-ID: <20260612-min-bpc-v1-0-bba88c2c4836@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 no draft userspace implementation this time around. Something
that would adequately make the case for all the uses of "min bpc" would
take a lot of effort to add to weston, and anything less than a full
implementation will then be used as ammo to argue against the property.

[1]: https://lore.kernel.org/dri-devel/20260330-link-bpc-v6-0-ff124af93e48@collabora.com/T/

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@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: 8372c3177e62bca48fdca142601d3d3804ff3129
change-id: 20260605-min-bpc-dbbf3b3a2521

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


             reply	other threads:[~2026-06-12 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 15:34 Nicolas Frattaroli [this message]
2026-06-12 15:34 ` [PATCH 1/2] drm/connector: Introduce " Nicolas Frattaroli
2026-06-24 15:49   ` Harry Wentland
2026-06-12 15:34 ` [PATCH 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=20260612-min-bpc-v1-0-bba88c2c4836@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=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®