From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C214347FB14 for ; Wed, 5 Aug 2026 15:34:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785944103; cv=none; b=X6Ul6bBiPzBal4abUc7XVLbwONQGi3aMGfFlFpcv2yzza5tREjFLaaGkSnAdrxbu7Y6n66ADhFUYg1m0UJJrU+4i6cfYC5VcnqF9GmtbvmjnT+RX7DNO4fo6pKwdIBhc6M7XN4qIDkS85r4PKXDdcfFCAkJROwC0nD3xwgzKjvs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785944103; c=relaxed/simple; bh=uJ8D6ynkbyyYzUliCKi+KphEsY74VL81AC2rcf9ibnU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mJnswCoPblCKG5B9V40zJDqvqjfBJUX05rmw2zSMaO+K2bSTi5k86LTAtfX1UcEvjZ2VBIPKE7fLVT3vHfLkRzpeHDpZ3pyhfSxwfciLR3WTGmr+qTdkJkf94XlZy7tgJvDAUE6HSFR17hhw3C+XPCouCPA2mGUjvtpy+VJCCb8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=p28Z1/zh; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p28Z1/zh" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-47fe45db360so136660f8f.2 for ; Wed, 05 Aug 2026 08:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785944093; x=1786548893; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=K7C5bX9yrteFlRiHmbAJKSV1MNI7QdrKD956BMaNNmc=; b=p28Z1/zhnknt5xEToKnR/+GJuycI8ojZhGCI2mFXiOu+87V3ZCwYc2Ug0t7siCrMCl Z5fT7OeewtX9+Xw4ZViJ7QCFFNf4nl2U9GyuAsNaOHCSOcTzXJN6tSe73ACWJaYEfkoM K7xsjwD4Ske4cathSZ6BUcY/PmO4x0w5JRWlSSHwI2pd6m4knW1uKatbSQgR8gal8NoY 8uGnMS1PEUOe5mUhU66opmjtAkUt+m8+Gj1NKmZMiyHK4/7wMOdRyExYxWiQrTsG73AK W/wWOgPpUAGcgiX+5EPcPegEMKUoCyj+OVm0bLMsj7IOJOFNlMabeJODKJ/FsahTmiem Mixg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785944093; x=1786548893; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=K7C5bX9yrteFlRiHmbAJKSV1MNI7QdrKD956BMaNNmc=; b=PTXTpatgvItUbuitTSvjpjqwngHQ3Tbd3WaE2BcOCjEqacFpDYAVPvZIsTTy6L+nNr v27tYlNUfTLAul/FoxUSHllFvlSKrGw0mx6MNJ3E17NUC2TfYXPHfX6IdbG2Bjjtd03Z GhaaWcSxpECEqRET5btQlqBKSzz+EcpGU1vpuiVp9kwRonGN4HZGHoOfxbiByYNaEIiu L7rN/qAkxZylY6+fWiHGCfH/LH7wfN1/abs222TdmhOKka5fD2MpXlR/nKs8L0SCN+sN TqeD8c5y8e7weoyr/67QM5cz+Sh+l5iV1xCt6Vnzz8IMr6269/8d1QV/rQS0x8AWcrcb q7/w== X-Forwarded-Encrypted: i=1; AHgh+RrqkW2MQEZr5iFLYUGOOY+3YTz02cqvm3AhPvnizlWmCKwuOKOUL0x9H+BKtcml7AZE9DPR0/yCAONR0y0=@vger.kernel.org X-Gm-Message-State: AOJu0Yxn9YNHZEgeAZ7RbjEmLH3ukfoCtxLyEXCVWaQfLnFWJnJMiQ0z NvFmqf7mSZ7j3zJWu/c72065ULyl065NOgknlXFDDa9Z1gzfobUircuU X-Gm-Gg: AR+sD12KtaJUuwv1VANvBNkxrmWfAcXo9KagMlyguMTJrycuKtjj1wjQBKkphD0HKTv /Aid9EJvkzs2E/7Ckoy0WJQC5KCl8fKRgyqFrTv+tXJaoYGFK5yti+L9OwrWQ9T9xZ5BNXbzaGb 65uo/tLSlWx58ytA/2DdR4OKSA5t9HchnrywJ2x7UCDxKosarwtVHnWhml5Xv7tRF4Wv1sfBt5Z 93wAgxlpKFLdBmh/gIbqliGRMpLfV6LfJ0hw+9C+kpiqajXElTNncwo8RLwGqJeAR0Y5yobh3zP LJ7qAWgmuR2+6NErU7ri02+ZuLMw8Cnpm/++Zy0fIhEwd+vbjhf+E0479rFsVo0rb98fvZKvJ3g Htb24HtLmu4cSxd6skXwEWLy+/r50fsvecO7J5m/MxWE/VghFuA2mwc0mYuppJ2v7gE7ijrdB+E QwSK/+RSEz8gQWl54xLSZqSE2QZMnXo7/7brKwr2gA1KGFYlpMgNoBQ78z6NrTm0FcQIp9y53hi 6fbSplZ8IRgUljQ6KlA7Ge7dVxr6I+W5Shurf8XIrswcfV+4UEcJ1aUFDd9QsjSPOGY X-Received: by 2002:a05:600c:1549:b0:498:1371:660c with SMTP id 5b1f17b1804b1-4994e704bd5mr50927585e9.0.1785944093070; Wed, 05 Aug 2026 08:34:53 -0700 (PDT) Received: from OrangePi5-Plus.BB-HOME (20014C4E1B86F10001BE789C6EE938EE.dsl.pool.telekom.hu. [2001:4c4e:1b86:f100:1be:789c:6ee9:38ee]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47febfda6afsm9047223f8f.3.2026.08.05.08.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 08:34:52 -0700 (PDT) From: Igor Paunovic To: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Cristian Ciocaltea , Igor Paunovic Subject: [PATCH v2] drm/rockchip: dw_hdmi_qp: attach the HDMI Colorspace connector property Date: Wed, 5 Aug 2026 17:33:55 +0200 Message-ID: <20260805153416.8459-1-royalnet026@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The RK3588 HDMI QP output never exposes the "Colorspace" connector property, so userspace has no way to request BT.2020 colorimetry. Everything needed to signal it is already in place. The connector comes from drm_bridge_connector_init(), which calls drmm_connector_hdmi_init() and attaches "max bpc", "HDR_OUTPUT_METADATA" and the output color format, and the HDMI state helper feeds conn_state->colorspace into the AVI infoframe colorimetry bits via hdmi_generate_avi_infoframe() and drm_hdmi_avi_infoframe_colorimetry(). dw-hdmi-qp then emits the infoframe through its hdmi_write_avi_infoframe hook. Only the property itself is missing, so conn_state->colorspace stays at its default and the AVI infoframe always reports "no colorimetry data". The user-visible effect is that HDR is unavailable on every RK3588 HDMI output. KWin (Plasma 6.x) requires "Colorspace" alongside "HDR_OUTPUT_METADATA" and "max bpc" before it treats an output as wide-gamut capable, so it never offers the HDR toggle. Create and attach the property right after the bridge connector is initialised, as vc4_hdmi already does. Passing 0 to drm_mode_create_hdmi_colorspace_property() selects the full HDMI colorspace set defined by the core. Tested on an Orange Pi 5 Plus driving a Samsung Odyssey G70B: KWin now offers the HDR toggle, the connector property switches to BT2020_RGB once HDR is enabled, and the output runs 4K@144 at 10 bpc. Signed-off-by: Igor Paunovic --- Changes in v2: - Regenerated with git format-patch. v1 was a hand-assembled diff: it carried no "diff --git" header, no diffstat, and no function context on the @@ hunk header. That is the most likely reason it never showed up in patchwork and got no review in three weeks. - Rebased onto drm-misc-next (97c03b32b28a), the right tree for this change. The hunk is unchanged apart from its new offset and the function context that format-patch adds. - Reworded the commit message to lead with the user-visible effect and to name the exact core path that consumes conn_state->colorspace. - Trimmed the in-code comment to a single line; the reasoning now lives in the commit message instead. No functional change from v1: the two API calls and their placement are the same. - An automated review of v1 flagged that returning an error from dw_hdmi_qp_rockchip_bind() leaves hdmi->hpd_work queued. That gap pre-dates this patch and is shared by every existing error path in bind() (drmm_encoder_init(), dw_hdmi_qp_bind(), drm_bridge_connector_init()), since cancel_delayed_work_sync() runs only in dw_hdmi_qp_rockchip_unbind(), which the component framework does not call for a failed bind(). It is already being addressed in the HDMI 2.0 series below ("Cancel pending HPD work on suspend", 30/69, and "Control the HPD IRQ line via the bridge HPD ops", 37/69), so this patch adds nothing for it. v1: https://lore.kernel.org/all/20260714202850.40999-1-royalnet026@gmail.com/ HDMI 2.0 series: https://lore.kernel.org/all/20260731-dw-hdmi-qp-scramb-v10-0-294364b2cf15@collabora.com/ drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c index 9c4cf68d79d5..35d04680d011 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c @@ -695,6 +695,13 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master, return dev_err_probe(hdmi->dev, PTR_ERR(connector), "Failed to init bridge connector\n"); + /* Passing 0 selects the full HDMI colorspace set defined by the core. */ + ret = drm_mode_create_hdmi_colorspace_property(connector, 0); + if (ret) + return ret; + + drm_connector_attach_colorspace_property(connector); + return 0; } base-commit: 97c03b32b28a9f7f13f768f2b06e1eaafe850e66 -- 2.43.0