From: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Yongxing Mou <yongxing.mou@oss.qualcomm.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Subject: [PATCH v6 14/15] drm/msm/dp: separate dp_display_prepare() into its own API
Date: Tue, 02 Jun 2026 17:11:26 +0800 [thread overview]
Message-ID: <20260602-dp_mstclean-v6-14-2c17ff40a9b2@oss.qualcomm.com> (raw)
In-Reply-To: <20260602-dp_mstclean-v6-0-2c17ff40a9b2@oss.qualcomm.com>
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
For MST, the link setup should only be done once when multiple sinks are
enabled, while stream setup may run multiple times for each sink. Split
the link-related preparation out of msm_dp_display_atomic_enable() so it
can be called separately before the per-stream enable path.
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/gpu/drm/msm/dp/dp_display.c | 16 +++++++++++-----
drivers/gpu/drm/msm/dp/dp_display.h | 5 +++--
drivers/gpu/drm/msm/dp/dp_drm.c | 6 ++++--
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 2d5ef087648c..cd1f2899b733 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1403,8 +1403,8 @@ int msm_dp_modeset_init(struct msm_dp *msm_dp_display, struct drm_device *dev,
return 0;
}
-void msm_dp_display_atomic_enable(struct msm_dp *msm_dp_display,
- struct drm_atomic_commit *state)
+void msm_dp_display_atomic_prepare(struct msm_dp *msm_dp_display,
+ struct drm_atomic_commit *state)
{
struct drm_crtc *crtc;
struct drm_crtc_state *crtc_state;
@@ -1426,10 +1426,16 @@ void msm_dp_display_atomic_enable(struct msm_dp *msm_dp_display,
}
rc = msm_dp_display_prepare_link(dp);
- if (rc) {
+ if (rc)
DRM_ERROR("DP display prepare failed, rc=%d\n", rc);
- return;
- }
+}
+
+void msm_dp_display_atomic_enable(struct msm_dp *msm_dp_display)
+{
+ struct msm_dp_display_private *dp;
+ int rc = 0;
+
+ dp = container_of(msm_dp_display, struct msm_dp_display_private, msm_dp_display);
rc = msm_dp_display_enable(dp);
if (rc)
diff --git a/drivers/gpu/drm/msm/dp/dp_display.h b/drivers/gpu/drm/msm/dp/dp_display.h
index 5116f7bbbd02..43ed79093e24 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.h
+++ b/drivers/gpu/drm/msm/dp/dp_display.h
@@ -35,8 +35,9 @@ void msm_dp_display_set_psr(struct msm_dp *dp, bool enter);
void msm_dp_display_debugfs_init(struct msm_dp *msm_dp_display, struct dentry *dentry, bool is_edp);
void msm_dp_display_atomic_post_disable(struct msm_dp *dp_display);
void msm_dp_display_atomic_disable(struct msm_dp *dp_display);
-void msm_dp_display_atomic_enable(struct msm_dp *dp_display,
- struct drm_atomic_commit *state);
+void msm_dp_display_atomic_prepare(struct msm_dp *dp_display,
+ struct drm_atomic_commit *state);
+void msm_dp_display_atomic_enable(struct msm_dp *dp_display);
enum drm_mode_status msm_dp_display_mode_valid(struct msm_dp *dp,
const struct drm_display_info *info,
const struct drm_display_mode *mode);
diff --git a/drivers/gpu/drm/msm/dp/dp_drm.c b/drivers/gpu/drm/msm/dp/dp_drm.c
index 6b8923d9dff4..4bf1a5b7c3f9 100644
--- a/drivers/gpu/drm/msm/dp/dp_drm.c
+++ b/drivers/gpu/drm/msm/dp/dp_drm.c
@@ -55,7 +55,8 @@ static void msm_dp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
struct msm_dp *dp = dp_bridge->msm_dp_display;
- msm_dp_display_atomic_enable(dp, state);
+ msm_dp_display_atomic_prepare(dp, state);
+ msm_dp_display_atomic_enable(dp);
}
static void msm_dp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
@@ -152,7 +153,8 @@ static void msm_edp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
return;
}
- msm_dp_display_atomic_enable(dp, state);
+ msm_dp_display_atomic_prepare(dp, state);
+ msm_dp_display_atomic_enable(dp);
}
static void msm_edp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
--
2.43.0
next prev parent reply other threads:[~2026-06-02 9:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 9:11 [PATCH v6 00/15] drm/msm/dp: Prerequisite cleanup for upcoming MST support Yongxing Mou
2026-06-02 9:11 ` [PATCH v6 01/15] drm/msm/dp: remove cached drm_edid from panel Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 02/15] drm/msm/dp: drop deprecated .mode_set() and use .atomic_enable Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 03/15] drm/msm/dp: move mode setup into msm_dp_panel_init_panel_info() Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 04/15] drm/msm/dp: split msm_dp_ctrl_config_ctrl() into link parts and stream parts Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 05/15] drm/msm/dp: extract MISC1_MISC0 configuration into a separate function Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 06/15] drm/msm/dp: split link setup from source params Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 07/15] drm/msm/dp: move the pixel clock control to its own API Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 08/15] drm/msm/dp: break up dp_display_enable into two parts Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 09/15] drm/msm/dp: re-arrange dp_display_disable() into functional parts Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 10/15] drm/msm/dp: allow dp_ctrl stream APIs to use any panel passed to it Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 11/15] drm/msm/dp: split dp_ctrl_off() into stream and link parts Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 12/15] drm/msm/dp: simplify link and clock disable sequence Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 13/15] drm/msm/dp: make bridge helpers use dp_display to allow re-use Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-02 9:11 ` Yongxing Mou [this message]
2026-06-04 3:01 ` Claude review: drm/msm/dp: separate dp_display_prepare() into its own API Claude Code Review Bot
2026-06-02 9:11 ` [PATCH v6 15/15] drm/msm/dp: pass panel to display enable/disable helpers Yongxing Mou
2026-06-04 3:01 ` Claude review: " Claude Code Review Bot
2026-06-04 3:01 ` Claude review: drm/msm/dp: Prerequisite cleanup for upcoming MST support Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260602-dp_mstclean-v6-14-2c17ff40a9b2@oss.qualcomm.com \
--to=yongxing.mou@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox