This series adds standard KMS static HDR metadata and BT.2020 RGB signalling to MSM DP and eDP, with HDR10 as the intended use case. It uses HDR_OUTPUT_METADATA, Colorspace and max bpc. Userspace supplies the HDR pixel content; DSC, dynamic HDR and tone mapping are outside this series.
Patches 1-3 allow max bpc registration before connector state allocation, restore the attached property default, remove the early state allocation workarounds and register max bpc centrally for non-HDMI bridge connectors. Patch 4 makes the SDP header packing input const. Patch 5 prepares generic SDP slots. The HPD state serialization and debugfs connector pointer fixes are already in linux-next and are not included in this revision. On the current v7.3-rc5 base, both fixes are applied as prerequisites. Patches 6-9 move runtime PM calls outside the connection lock, serialize stream operations with HPD, establish PHY power ownership and add stream enable rollback, including AUX recovery for a connected external peer. New error returns are introduced together with their cleanup paths. Patches 10-12 add deferred link-status notification, persistent eDP link capability caching and stream reconstruction for modesets leaving eDP self refresh. Patch 13 adds atomic output depth selection. Patches 14-17 clear stale MSA colorimetry, flush VSC removal, exclude YUV420 streams from PSR and move VSC packets into bridge atomic state. Patch 18 adds BT.2020 RGB signalling. Patch 19 serializes SDR video-test state changes with mode programming. Patch 20 adds complete static HDR support: metadata validation and packing, 10 bpc enforcement, Generic2 programming and teardown, stream restoration, PSR exclusion and arbitration with video-pattern tests. A test request arriving after atomic check cannot replace the checked HDR output depth. This series is tested on a Lenovo Yoga Slim 7x using x1e80100. Signed-off-by: Xilin Wu <[email protected]> --- Changes in v2: - Drop the HPD state serialization and debugfs connector pointer fixes, which are already in linux-next. - Restore max bpc from the property default and remove early connector state allocation workarounds, with regression coverage. (Maxime) - Register non-HDMI max bpc in the bridge connector helper and advertise the MSM DP/eDP limit through bridge->max_bpc. (Dmitry) - Split the const SDP header change into a separate patch. (Dmitry) - Serialize stream operations and rollback with HPD before tracking PHY ownership; keep runtime PM calls outside the connection lock. (Sashiko) - Clear the sink training pattern before returning a retraining error. (Sashiko) - Use the link-status property helper and move TODO removal into the failure notification patch. (Dmitry) - Cache eDP link capabilities after the first successful discovery and retain them across power transitions. (Dmitry) - Discover eDP bandwidth limits before atomic check and reject unknown limits instead of deferring validation to enable. (Sashiko) - Keep the checked depth during training fallback and only accept links that can carry the unchanged stream. (Dmitry) - Derive PSR eligibility from the checked VSC state, including YUV420 modes with default colorimetry. (Sashiko) - Program the checked VSC packet unchanged for normal streams; rebuild it only for video compliance tests. (Dmitry) - Split MSA cleanup, VSC updates, PSR exclusion and atomic VSC state from BT.2020 RGB support. (Dmitry) - Validate HDR controller support during atomic check. (Sashiko) - Pass checked VSC/HDR state through stream programming instead of copying the configuration into the panel. (Dmitry) - Link to v1: https://patch.msgid.link/[email protected] To: Maarten Lankhorst <[email protected]> To: Maxime Ripard <[email protected]> To: Thomas Zimmermann <[email protected]> To: David Airlie <[email protected]> To: Simona Vetter <[email protected]> To: Andrzej Hajda <[email protected]> To: Neil Armstrong <[email protected]> To: Robert Foss <[email protected]> To: Laurent Pinchart <[email protected]> To: Jonas Karlman <[email protected]> To: Jernej Skrabec <[email protected]> To: Luca Ceresoli <[email protected]> To: Kevin Hilman <[email protected]> To: Jerome Brunet <[email protected]> To: Martin Blumenstingl <[email protected]> To: Rob Clark <[email protected]> To: Dmitry Baryshkov <[email protected]> To: Abhinav Kumar <[email protected]> To: Jessica Zhang <[email protected]> To: Sean Paul <[email protected]> To: Marijn Suijten <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] --- Xilin Wu (20): drm/atomic: Handle max bpc properties before connector state allocation drm/connector: Drop early state allocation for max bpc registration drm/bridge-connector: Attach max bpc for non-HDMI bridges drm/msm/dp: Accept a const SDP header when packing drm/msm/dp: Support multiple generic SDP slots drm/msm/dp: Keep runtime PM calls outside the connection lock drm/msm/dp: Serialize stream operations with HPD processing drm/msm/dp: Track PHY power ownership drm/msm/dp: Unwind resources when enabling a stream fails drm/msm/dp: Report stream enable failures through link status drm/msm/dp: Cache eDP link capabilities after successful discovery drm/msm/dp: Rebuild the eDP stream on modesets leaving self refresh drm/msm/dp: Track output bit depth in bridge atomic state drm/msm/dp: Clear stale MSA colorimetry bits drm/msm/dp: Flush VSC updates when leaving YUV420 drm/msm/dp: Disable PSR for YUV420 streams drm/msm/dp: Track VSC packets in bridge atomic state drm/msm/dp: Signal BT.2020 RGB on DP and eDP drm/msm/dp: Serialize video test state changes drm/msm/dp: Add static HDR metadata support for DP and eDP drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 - drivers/gpu/drm/display/drm_bridge_connector.c | 18 + drivers/gpu/drm/drm_atomic_state_helper.c | 8 + drivers/gpu/drm/drm_connector.c | 22 +- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 6 - drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/dp/dp_ctrl.c | 263 ++++++++++---- drivers/gpu/drm/msm/dp/dp_ctrl.h | 9 +- drivers/gpu/drm/msm/dp/dp_debug.c | 27 +- drivers/gpu/drm/msm/dp/dp_debug.h | 8 +- drivers/gpu/drm/msm/dp/dp_display.c | 483 +++++++++++++++++++++---- drivers/gpu/drm/msm/dp/dp_display.h | 8 +- drivers/gpu/drm/msm/dp/dp_drm.c | 133 ++++++- drivers/gpu/drm/msm/dp/dp_drm.h | 14 + drivers/gpu/drm/msm/dp/dp_panel.c | 176 +++++---- drivers/gpu/drm/msm/dp/dp_panel.h | 9 +- drivers/gpu/drm/msm/dp/dp_reg.h | 4 + drivers/gpu/drm/msm/dp/dp_utils.c | 134 ++++++- drivers/gpu/drm/msm/dp/dp_utils.h | 23 +- drivers/gpu/drm/tests/drm_connector_test.c | 62 ++++ include/drm/drm_bridge.h | 11 +- 21 files changed, 1128 insertions(+), 297 deletions(-) --- base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e change-id: 20260930-msm-dp-hdr10-d84e11282319 prerequisite-patch-id: a243647e29c62d6ff1c8dfbbc85d60d76a5b4b54 prerequisite-patch-id: 41a4bb615c78c11b576a148af6786f0a8a63c172 Best regards, -- Xilin Wu <[email protected]>
