Skip to content

drm/msm: introduce the struct msm_display interface

Dmitry Baryshkov dri-devel linux-arm-msm lkml 1 version New

Get series with b4
b4 am 20260722-drm-msm-display-interface-v1-0-368c10fe62fd@oss.qualcomm.com change-id 20260722-drm-msm-display-interface-5bccec4b69d5

Versions newest first

  1. v1 Latest24 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24drm/msm/dp: reject YUV420-only modes without VSC SDP supportdrivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/msm_drv.h+13 -260 replies
2/24drm/msm/dp: drop the always-true yuv_supported argumentdrivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_drm.c +2 more+9 -120 replies
3/24drm/msm: create the display connectors from common codedrivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +2 more+78 -460 replies
4/24drm/msm: introduce the struct msm_display interfacedrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_display.h drivers/gpu/drm/msm/dsi/dsi.c +5 more+115 -550 replies
5/24drm/msm: route the display snapshot through the msm_display interfacedrivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dsi/dsi.c +2 more+36 -240 replies
6/24drm/msm/hdmi: capture the HDMI registers in the display snapshotdrivers/gpu/drm/msm/hdmi/hdmi.c drivers/gpu/drm/msm/hdmi/hdmi.h+14 -10 replies
7/24drm/msm: add the wide_bus_enabled callback to msm_displaydrivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_display.h +3 more+53 -230 replies
8/24drm/msm: add the needs_periph_flush callback to msm_displaydrivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dsi/dsi.c +2 more+54 -330 replies
9/24drm/msm: add the is_cmd_mode callback to msm_displaydrivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c drivers/gpu/drm/msm/dp/dp_display.c +3 more+23 -80 replies
10/24drm/msm: add the get_dsc_config callback to msm_displaydrivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dsi/dsi.c +2 more+22 -110 replies
11/24drm/msm: add the get_te_source callback to msm_displaydrivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dsi/dsi.c +3 more+25 -140 replies
12/24drm/msm: add is_bonded and needs_encoder callbacks to msm_displaydrivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dsi/dsi.c +3 more+52 -140 replies
13/24drm/msm/hdmi: use dev_get_drvdata() in msm_hdmi_unbind()drivers/gpu/drm/msm/hdmi/hdmi.c+3 -40 replies
14/24drm/msm: store the display sub-blocks as struct msm_displaydrivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +7 more+19 -500 replies
15/24drm/msm/dp: do not reject wide-bus modes while a YUV420 mode is activedrivers/gpu/drm/msm/dp/dp_display.c+1 -10 replies
16/24drm/msm/dp: remove cached drm_edid from paneldrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_panel.c drivers/gpu/drm/msm/dp/dp_panel.h+27 -730 replies
17/24drm/msm/dp: drop deprecated .mode_set() and use .atomic_pre_enabledrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_drm.c drivers/gpu/drm/msm/dp/dp_drm.h+51 -610 replies
18/24drm/msm/hdmi: cache is_hdmi instead of storing the connectordrivers/gpu/drm/msm/hdmi/hdmi.c drivers/gpu/drm/msm/hdmi/hdmi.h drivers/gpu/drm/msm/hdmi/hdmi_audio.c +1 more+26 -130 replies
19/24drm/msm/dp: drop redundant panel->connectordrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_display.h drivers/gpu/drm/msm/dp/dp_drm.c +2 more+19 -220 replies
20/24drm/msm/dp: use drm_display_info in mode_valid callbacksdrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_drm.c+4 -40 replies
21/24drm/msm/dp: guard subconnector setup on the connector typedrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_drm.c+3 -30 replies
22/24drm/msm/dp: stop storing the connector in struct msm_dpdrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_display.h+74 -350 replies
23/24drm/msm: create the bridge connectors from common codedrivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_drm.c +6 more+52 -770 replies
24/24drm/bridge-connector: attach the DP subconnector propertydrivers/gpu/drm/display/drm_bridge_connector.c drivers/gpu/drm/msm/msm_kms.c+4 -50 replies

Reviews trailers per patch

2 of 24 patches have a Reviewed-by or Acked-by.

PatchDmitry Baryshkov
1/24
2/24
3/24
4/24
5/24
6/24
7/24
8/24
9/24
10/24
11/24
12/24
13/24
14/24
15/24
16/24R-b
17/24R-b
18/24
19/24
20/24
21/24
22/24
23/24
24/24

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/24] drm/msm: introduce the struct msm_display interface

The msm KMS core and its DPU/MDP5/MDP4 backends reach into the concrete DSI, DP and HDMI sub-blocks all over the place. Connector creation is open-coded in each backend and in each sub-block, the bonded-DSI dispatch is duplicated three times with subtle variations, and every cross-module query (command mode, wide bus, DSC config, tear-check source, peripheral flush, snapshot, ...) is a type-specific msm_dsi_*()/msm_dp_*()/ msm_hdmi_*() helper reached through an interface-type switch. In the other direction the sub-blocks cache drm_connector pointers that the core has to hand back to them, coupling each sub-block to a connector it does not own.

Refactor the MSM display / encoder interface. Introduce a small struct msm_display interface, embedded in struct msm_dsi, struct msm_dp and struct hdmi, and fold the per-sub-block operations into it one callback at a time: modeset_init(), snapshot(), the wide-bus / command-mode / DSC / TE-source / peripheral-flush / bonded / encoder queries. Once every cross-module call goes through the interface, struct msm_kms can store the sub-blocks as struct msm_display pointers and drop the concrete accessors entirely.

On top of that, move connector creation into common code: each backend now only builds the (genuinely backend-specific) encoder and attaches the bridge chain, and a shared msm_kms_init_connectors() walks the encoders once the bridges are in place and creates a bridge connector for each. The last DisplayPort-specific bit, attaching the DP subconnector property, is generalised into drm_bridge_connector_init() so it is applied to any DisplayPort bridge connector rather than open-coded in msm.

The series incorporates two patches by Yongxing Mou from [1], one patch is added as is, another one has minor fix.

[1] https://lore.kernel.org/dri-devel/[email protected]/

---
Dmitry Baryshkov (22):
drm/msm/dp: reject YUV420-only modes without VSC SDP support drm/msm/dp: drop the always-true yuv_supported argument drm/msm: create the display connectors from common code drm/msm: introduce the struct msm_display interface drm/msm: route the display snapshot through the msm_display interface drm/msm/hdmi: capture the HDMI registers in the display snapshot drm/msm: add the wide_bus_enabled callback to msm_display drm/msm: add the needs_periph_flush callback to msm_display drm/msm: add the is_cmd_mode callback to msm_display drm/msm: add the get_dsc_config callback to msm_display drm/msm: add the get_te_source callback to msm_display drm/msm: add is_bonded and needs_encoder callbacks to msm_display drm/msm/hdmi: use dev_get_drvdata() in msm_hdmi_unbind() drm/msm: store the display sub-blocks as struct msm_display drm/msm/dp: do not reject wide-bus modes while a YUV420 mode is active drm/msm/hdmi: cache is_hdmi instead of storing the connector drm/msm/dp: drop redundant panel->connector
drm/msm/dp: use drm_display_info in mode_valid callbacks drm/msm/dp: guard subconnector setup on the connector type drm/msm/dp: stop storing the connector in struct msm_dp drm/msm: create the bridge connectors from common code drm/bridge-connector: attach the DP subconnector property

Yongxing Mou (2):
drm/msm/dp: remove cached drm_edid from panel drm/msm/dp: drop deprecated .mode_set() and use .atomic_pre_enable

 drivers/gpu/drm/display/drm_bridge_connector.c    |   4 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c       |  64 ++--
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c           |  52 +---
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c          |  26 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c          |  11 +-
 drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c |  19 +-
 drivers/gpu/drm/msm/dp/dp_display.c               | 353 +++++++++++++---------
 drivers/gpu/drm/msm/dp/dp_display.h               |   7 +-
 drivers/gpu/drm/msm/dp/dp_drm.c                   |  30 +-
 drivers/gpu/drm/msm/dp/dp_drm.h                   |  10 +-
 drivers/gpu/drm/msm/dp/dp_panel.c                 |  62 +---
 drivers/gpu/drm/msm/dp/dp_panel.h                 |  15 +-
 drivers/gpu/drm/msm/dsi/dsi.c                     |  71 ++++-
 drivers/gpu/drm/msm/dsi/dsi.h                     |   8 +-
 drivers/gpu/drm/msm/dsi/dsi_manager.c             |  18 +-
 drivers/gpu/drm/msm/hdmi/hdmi.c                   | 101 +++++--
 drivers/gpu/drm/msm/hdmi/hdmi.h                   |   7 +-
 drivers/gpu/drm/msm/hdmi/hdmi_audio.c             |   2 +-
 drivers/gpu/drm/msm/hdmi/hdmi_bridge.c            |  16 +-
 drivers/gpu/drm/msm/msm_drv.h                     | 135 +++------
 drivers/gpu/drm/msm/msm_kms.c                     |  90 ++++++
 drivers/gpu/drm/msm/msm_kms.h                     |   9 +-
 22 files changed, 636 insertions(+), 474 deletions(-)

---
base-commit: b2128290c29902315e632ea59e0504d6bc9e9b42
change-id: 20260722-drm-msm-display-interface-5bccec4b69d5

Best regards,

Signature · 2 lines
With best wishes
Dmitry