All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/24] drm/msm: introduce the struct msm_display interface
@ 2026-07-22  6:36 Dmitry Baryshkov
  2026-07-22  6:36 ` [PATCH 01/24] drm/msm/dp: reject YUV420-only modes without VSC SDP support Dmitry Baryshkov
                   ` (23 more replies)
  0 siblings, 24 replies; 36+ messages in thread
From: Dmitry Baryshkov @ 2026-07-22  6:36 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Yongxing Mou,
	Abhinav Kumar

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/20260720-dp_mstclean-v8-0-bea261bf4e7d@oss.qualcomm.com/

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
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,
--  
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2026-07-22  7:12 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22  6:36 [PATCH 00/24] drm/msm: introduce the struct msm_display interface Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 01/24] drm/msm/dp: reject YUV420-only modes without VSC SDP support Dmitry Baryshkov
2026-07-22  7:03   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 02/24] drm/msm/dp: drop the always-true yuv_supported argument Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 03/24] drm/msm: create the display connectors from common code Dmitry Baryshkov
2026-07-22  7:04   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 04/24] drm/msm: introduce the struct msm_display interface Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 05/24] drm/msm: route the display snapshot through the " Dmitry Baryshkov
2026-07-22  6:56   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 06/24] drm/msm/hdmi: capture the HDMI registers in the display snapshot Dmitry Baryshkov
2026-07-22  6:59   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 07/24] drm/msm: add the wide_bus_enabled callback to msm_display Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 08/24] drm/msm: add the needs_periph_flush " Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 09/24] drm/msm: add the is_cmd_mode " Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 10/24] drm/msm: add the get_dsc_config " Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 11/24] drm/msm: add the get_te_source " Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 12/24] drm/msm: add is_bonded and needs_encoder callbacks " Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 13/24] drm/msm/hdmi: use dev_get_drvdata() in msm_hdmi_unbind() Dmitry Baryshkov
2026-07-22  7:03   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 14/24] drm/msm: store the display sub-blocks as struct msm_display Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 15/24] drm/msm/dp: do not reject wide-bus modes while a YUV420 mode is active Dmitry Baryshkov
2026-07-22  7:03   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 16/24] drm/msm/dp: remove cached drm_edid from panel Dmitry Baryshkov
2026-07-22  7:08   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 17/24] drm/msm/dp: drop deprecated .mode_set() and use .atomic_pre_enable Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 18/24] drm/msm/hdmi: cache is_hdmi instead of storing the connector Dmitry Baryshkov
2026-07-22  7:06   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 19/24] drm/msm/dp: drop redundant panel->connector Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 20/24] drm/msm/dp: use drm_display_info in mode_valid callbacks Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 21/24] drm/msm/dp: guard subconnector setup on the connector type Dmitry Baryshkov
2026-07-22  6:36 ` [PATCH 22/24] drm/msm/dp: stop storing the connector in struct msm_dp Dmitry Baryshkov
2026-07-22  7:12   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 23/24] drm/msm: create the bridge connectors from common code Dmitry Baryshkov
2026-07-22  7:04   ` sashiko-bot
2026-07-22  6:36 ` [PATCH 24/24] drm/bridge-connector: attach the DP subconnector property Dmitry Baryshkov
2026-07-22  7:05   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.