From: "Jan Claußen" <jan.claussen10@web.de>
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>
Cc: "Jan Claußen" <jan.claussen10@web.de>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 3/7] drm/connector: hdmi: Create the colorspace property
Date: Sun, 18 Oct 2026 16:31:09 +0200 [thread overview]
Message-ID: <20261018143135.5745-4-jan.claussen10@web.de> (raw)
In-Reply-To: <20261018143135.5745-1-jan.claussen10@web.de>
HDMI connectors initialised through drmm_connector_hdmi_init() do not
expose the colorspace property, so userspace cannot signal colorimetry
such as BT.2020 for HDR output. KWin, for instance, does not offer HDR
without it.
Add a supported_colorspaces bitmask to struct drm_connector_hdmi_funcs.
If a driver sets it, create and attach the colorspace property with
the colorspaces it lists, next to the other HDMI properties.
Signed-off-by: Jan Claußen <jan.claussen10@web.de>
---
drivers/gpu/drm/drm_connector.c | 9 +++++++++
include/drm/drm_connector.h | 7 +++++++
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 66f53e155342..eea27bb6557c 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -672,6 +672,15 @@ int drmm_connector_hdmi_init(struct drm_device *dev,
/* TODO: remove after conversion to new drmm_connector_hdmi_init() */
connector->max_bpc = hdmi_funcs->max_bpc;
+ if (hdmi_funcs->supported_colorspaces) {
+ ret = drm_mode_create_hdmi_colorspace_property(connector,
+ hdmi_funcs->supported_colorspaces);
+ if (ret)
+ return ret;
+
+ drm_connector_attach_colorspace_property(connector);
+ }
+
if (hdmi_funcs->max_bpc > 8)
drm_connector_attach_hdr_output_metadata_property(connector);
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 2ee7c59329aa..9d2d133463ba 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1521,6 +1521,13 @@ struct drm_connector_hdmi_funcs {
*/
unsigned long supported_formats;
+ /**
+ * @supported_colorspaces:
+ *
+ * Bitmask of &enum drm_colorspace listing supported color spaces.
+ */
+ unsigned long supported_colorspaces;
+
/**
* @max_bpc: Maximum bits per char the HDMI connector supports.
*/
--
2.56.0
next prev parent reply other threads:[~2026-10-18 14:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 14:31 [PATCH v4 0/7] drm: Add colorspace property support to the HDMI helpers Jan Claußen
2026-10-18 14:31 ` [PATCH v4 1/7] drm/connector: Fix typo in colorspace error messages Jan Claußen
2026-10-18 14:31 ` [PATCH v4 2/7] drm/display: hdmi-state-helper: Force modeset on colorspace change Jan Claußen
2026-10-18 14:31 ` Jan Claußen [this message]
2026-10-18 14:31 ` [PATCH v4 4/7] drm/bridge-connector: Pass supported colorspaces to the HDMI helpers Jan Claußen
2026-10-18 14:31 ` [PATCH v4 5/7] drm/bridge: dw-hdmi-qp: Forward supported colorspaces from platform data Jan Claußen
2026-10-18 14:31 ` [PATCH v4 6/7] drm/rockchip: dw_hdmi_qp: Set the VOP2 color space from the connector Jan Claußen
2026-10-18 14:31 ` [PATCH v4 7/7] drm/rockchip: dw_hdmi_qp: Advertise BT.709 and BT.2020 colorimetries Jan Claußen
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=20261018143135.5745-4-jan.claussen10@web.de \
--to=jan.claussen10@web.de \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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®