From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 C4AC241C72 for ; Sat, 8 Aug 2026 09:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786183100; cv=none; b=p15OKCJm8f9coGBxdeEa+VgOBP7U84symsZAsGrjW9KsIbQ2lGJpNQjx68mP1not1RUBgMQhYQizKJgNZSZ5TTxQTEgMl0esclXNwX/8ecZ4MyuPUq45pxlS60JRtXo2kuKigzeY8EPDk9XY9Tb5em9GWxqOKGXHuCBUxWKq0AY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786183100; c=relaxed/simple; bh=skDVuuy0MENzHOtO5R9WI50dUIwriv7mbApgceBxmoc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gT9UBfkUwc0Tk8PavztdaAtho5fP2oM6paLf6FRAI/A2MebOqxtkTzjPsNtVNFUeV/yYdHn8l++CSOUcqtmwAqzcR+0csdHMpj5zW1wIuotw6eE09j/2efmlq37hMZQ0jMTCeQISdyKbWB9QyxFKYMdmiOCmI1sqZkC+tbKce48= 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=c8Us3F5h; arc=none smtp.client-ip=209.85.128.41 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="c8Us3F5h" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4957952e0f8so332235e9.2 for ; Sat, 08 Aug 2026 02:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786183097; x=1786787897; 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=IsmdHGBBN2+wKUl5FWJM6Pw9aztZUCcwWWnKCiJWwQo=; b=c8Us3F5hTUN/q4U1Mjf/00BHcYASP30uWxjUVYjQSByg26vCJuBMfDmIUkjzaK/99S j4WjhKZ8QtZyhFhSxifd9/sFCmsYdbcH/odnNJLTCBIuBST6pdfQGDKLmO9YsY77hfdc NEE9YkkKGppWpMAbh+KL63fwCxQN2yd+uPBqgSxvNen/7F7JY5Gxg8Iij+3bSm0A02R5 up9lEs7UKA+gUiOhnIf9pi042+dOoTNs2SOSzBUhpCotYJgnd1tiVp8tiKofG7k33eI8 KQ+sYC9PbduSmLCLoogR5J7HHUBFj5CYeXI9CvG6KmzYPjtA0IzhpriO8b46wJ8EvAlr OFsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786183097; x=1786787897; 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=IsmdHGBBN2+wKUl5FWJM6Pw9aztZUCcwWWnKCiJWwQo=; b=k25f6LV/wGXMSDh81vdTdbiCA3bHSebq+NhXfa7UvmFnRXkdpNKX5RyQHNEzLD2wul +ai6ROhKYseu8v1ZDcNwMxcDHYgbU7Wfs5tTqqtxt0vr/ixVMzC69SJVABMhu0sbCBrs ksmU5bhNrgu1awPJiUwIGH2FkV+AauNJ9EzbvrmM/t+sTpV22SUhHWs632i17TF+xNvd XWVbmJcWKSr4z9AA15xcrtfEFq69UAx3XGoxfW9MEGM3F++v9ly6RdH0mk6kPcb6uD7L a0Ydt/HkGXTgfR7MzMWVUehqIP0m0a/4W5r894s4Ecu+seEEH72Qht8YpsNo5FupuFqg JONg== X-Forwarded-Encrypted: i=1; AHgh+Rq4eU/RDYPSFMonBXVJUomRw/0u4wRvSdht1o2hIOvHTeCqgmN8GPv4+RiGnhQG46Yqk9dxuNqfxyz1Pxk=@vger.kernel.org X-Gm-Message-State: AOJu0Yzca0PjVnrVOJv2smOJ675u+cBdtYykvrJaIzUBOaepCAe68w5h 2Sz8RihgckOzKNR3m8obA/2ICsXq7jW3uFDyhojrS51zdLWClKwMGF9S X-Gm-Gg: AR+sD13aGKoGHfqIsIeV1NJ8o1b6KKZWl1zMcSbOzNNF4hFz4vMyhlhIxuq8eyfH+MM fwjwqyAOw4EL3235R2ZJSloTsKO/l2+vJ5KJxltLKqKxDC3BicD/uodkMaBOAkoi0GZDtuJh9QQ esYUGxzhY7b+k8G+zIk/gUUKstXI5odS2eVRXGLu94XxkQJrzTm8N8XYa1nsG8imA9MnUA6eyrn 19MaCs2IfLoHPeUm57gaRh2M7fT75/O7wOM0nXwlYyK8Ev94xeP7PBmI0htTERRDezSI3JDqll7 nAalFYUOhmItKK6NCl2bnqyODLfmCByFEiGQuX88MRlM7aoyLuoZHUHB/MpTwfeeDDpJ/1D+ssS BoKRu69m2VyQLoppPHr3pyRFw1uJFxGmT7gZBSjUPW6ID7aoAAKlturrH9gzB6viBgZJoaWXvFD XRzJrHyYOTsezlThlN0YJ2c3hyXfy6dEeMmHddS3HDatZi951d2VgrO89g69IcKX8O6IDhLDoKA nC4mlFdOSkNxXgV5w+qFaLXpoYHIBqp5S6cOdxJwc/IDpGQJCDobOyufiJPabHnFnYjGiRp1ue5 CXTq X-Received: by 2002:a05:6000:1447:b0:47f:921f:397f with SMTP id ffacd0b85a97d-47fec63e5bbmr22556379f8f.4.1786183096888; Sat, 08 Aug 2026 02:58:16 -0700 (PDT) Received: from OrangePi5-Plus.BB-HOME (20014C4E1B8E20009911270F4BEC2300.dsl.pool.telekom.hu. [2001:4c4e:1b8e:2000:9911:270f:4bec:2300]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-480020be8f3sm13255725f8f.0.2026.08.08.02.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2026 02:58:16 -0700 (PDT) From: Igor Paunovic To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sebastian Reichel , Cristian Ciocaltea , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Dmitry Baryshkov , Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Andy Yan , Jani Nikula , Rodrigo Vivi , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Imre Deak , Ankit Nautiyal , Igor Paunovic Subject: [PATCH 0/5] drm/bridge: synopsys: dw-dp: Add HDR support Date: Sat, 8 Aug 2026 11:57:19 +0200 Message-ID: <20260808095749.9428-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 This series teaches the Synopsys DesignWare DisplayPort bridge driver (dw-dp) to drive HDR sinks: it attaches the "max bpc", HDR_OUTPUT_METADATA and Colorspace connector properties and transmits the matching HDR Metadata InfoFrame SDP and BT.2020 VSC SDP colorimetry on the link. With the series applied, a Wayland compositor (tested with KWin 6.6.5) recognises the DP output as HDR capable and can enable HDR with wide color gamut on it. The series applies on drm-misc-next with Sebastian Reichel's "Synopsys DisplayPort Controller improvements" v11 [1] applied; the SDP infrastructure this series builds on (per-slot tracking, locking, the drm_output_color_format conversion) comes from that series. Happy to rebase on a future revision. Patch 1 lifts i915's HDR Metadata InfoFrame SDP packer into drm_dp_helper.c as drm_dp_hdr_metadata_infoframe_sdp_pack() and converts i915. Nothing in it is i915 specific. Patch 2 fixes a latent bridge-connector problem that attaching "max bpc" would otherwise expose: a connector that attached the property before drm_mode_config_reset() comes out of that reset with a freshly zeroed state and nothing restores max_requested_bpc. A driver that filters formats on conn_state->max_bpc then rejects every format, and property-naive clients (fbcon in particular) end up with a black screen. The HDMI bridge-connector path already restores the value from connector->max_bpc in drm_bridge_connector_create_state(); patch 2 mirrors that on the non-HDMI path. The meson no-regression analysis is in the commit message. Patches 3-5 are the dw-dp/Rockchip side: attach "max bpc" with range (6, 10) - the driver's format table tops out at 10 bpc - then send the HDR Metadata InfoFrame SDP once per frame while HDR metadata is set, and signal BT.2020 colorimetry via VSC SDP revision 5, including the VOP2 CSC selection in the Rockchip glue. BT.2020 requests are rejected in atomic_check() when the sink's DPCD lacks DP_VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED, so a userspace TEST_ONLY probe learns the configuration is impossible; i915 instead silently omits the VSC SDP in that case (patch 5 has the details). About the base, so that the test results below are not read too widely: the runtime testing was done on a rockchip-devel based kernel, which carries the v9 generation of the dw-dp series, with this series on top. The series as posted is rebased onto drm-misc-next + v11, where it applies without conflicts and the touched objects build cleanly, but I have not repeated the runtime tests on that base. I did test v11 itself on the same board separately [2]. Hardware: Rockchip RK3588 (Orange Pi 5 Plus), Samsung Odyssey G70B connected over USB-C DP alt mode through a USB-C to HDMI 2.1 protocol converter (DPCD ext rev 1.4, HBR2 x4, VSC SDP colorimetry supported): - KWin 6.6.5 flips the output from "HDR: incapable" to HDR capable as soon as the properties appear, and enables HDR + wide color gamut: the monitor switches to HDR mode and the picture visually matches the same panel driven from the board's HDMI output (dw-hdmi-qp) with HDR enabled. DRM state while HDR is on: "max bpc" = 10, Colorspace = BT2020_RGB, HDR_OUTPUT_METADATA blob with SMPTE ST 2084 EOTF. - Twelve consecutive HDR off/on cycles (24 modesets): no link or SDP errors and no -EBUSY from SDP slot allocation. - Plain SDR behavior is unchanged. Once the properties exist KWin writes Colorspace=Default, a NULL metadata blob and "max bpc" on every atomic modeset - verified to be a no-op. - The board boots to a working display with the properties attached, i.e. the boot-time config-reset path that patch 2 protects. Bandwidth note, for why "max bpc" matters here: on this HBR2 link 4K60 RGB 10-bit does not fit (17.82 Gbit/s payload vs 17.28 available), so 10-bit output needs YCbCr subsampling on this converter; native HBR3 links have the headroom for 4K60 10-bit RGB. [1] https://lore.kernel.org/dri-devel/20260806-synopsys-dw-dp-improvements-v11-0-0d508505f383@collabora.com/ [2] https://lore.kernel.org/all/20260808094138.7205-1-royalnet026@gmail.com/ Igor Paunovic (5): drm/dp: Add drm_dp_hdr_metadata_infoframe_sdp_pack() drm/display: bridge-connector: Preserve max bpc across connector reset drm/rockchip: dw_dp: Attach "max bpc" connector property drm/bridge: synopsys: dw-dp: Add HDR static metadata support drm/bridge: synopsys: dw-dp: Add BT.2020 colorimetry support drivers/gpu/drm/bridge/synopsys/dw-dp.c | 86 ++++++++++++++++++++++--- drivers/gpu/drm/display/drm_bridge_connector.c | 6 +- drivers/gpu/drm/display/drm_dp_helper.c | 88 ++++++++++++++++++++++++++ drivers/gpu/drm/drm_connector.c | 5 ++ drivers/gpu/drm/i915/display/intel_dp.c | 84 +----------------------- drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 66 ++++++++++++++++++- include/drm/display/drm_dp_helper.h | 4 ++ 7 files changed, 248 insertions(+), 91 deletions(-) -- 2.43.0