All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Subject: [PATCH v8 05/15] drm/msm/dp: extract MISC1_MISC0 configuration into a separate function
Date: Mon, 20 Jul 2026 14:08:12 +0800	[thread overview]
Message-ID: <20260720-dp_mstclean-v8-5-bea261bf4e7d@oss.qualcomm.com> (raw)
In-Reply-To: <20260720-dp_mstclean-v8-0-bea261bf4e7d@oss.qualcomm.com>

Refactor the MISC1_MISC0 register configuration into a standalone helper
function to support MST.

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_ctrl.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 4c62b0e137c3..ac24c958852b 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -458,17 +458,13 @@ static void msm_dp_ctrl_lane_mapping(struct msm_dp_ctrl_private *ctrl)
 			ln_mapping);
 }
 
-static void msm_dp_ctrl_configure_source_params(struct msm_dp_ctrl_private *ctrl)
+static void msm_dp_ctrl_config_misc1_misc0(struct msm_dp_ctrl_private *ctrl,
+					   struct msm_dp_panel *msm_dp_panel)
 {
 	u32 colorimetry_cfg, test_bits_depth, misc_val;
 
-	msm_dp_ctrl_lane_mapping(ctrl);
-	msm_dp_setup_peripheral_flush(ctrl);
-
-	msm_dp_ctrl_config_ctrl_link(ctrl);
-	msm_dp_ctrl_config_ctrl_streams(ctrl, ctrl->panel);
-
-	test_bits_depth = msm_dp_link_get_test_bits_depth(ctrl->link, ctrl->panel->msm_dp_mode.bpp);
+	test_bits_depth = msm_dp_link_get_test_bits_depth(ctrl->link,
+							  msm_dp_panel->msm_dp_mode.bpp);
 	colorimetry_cfg = msm_dp_link_get_colorimetry_config(ctrl->link);
 
 	misc_val = msm_dp_read_link(ctrl, REG_DP_MISC1_MISC0);
@@ -482,6 +478,17 @@ static void msm_dp_ctrl_configure_source_params(struct msm_dp_ctrl_private *ctrl
 
 	drm_dbg_dp(ctrl->drm_dev, "misc settings = 0x%x\n", misc_val);
 	msm_dp_write_link(ctrl, REG_DP_MISC1_MISC0, misc_val);
+}
+
+static void msm_dp_ctrl_configure_source_params(struct msm_dp_ctrl_private *ctrl)
+{
+	msm_dp_ctrl_lane_mapping(ctrl);
+	msm_dp_setup_peripheral_flush(ctrl);
+
+	msm_dp_ctrl_config_ctrl_link(ctrl);
+	msm_dp_ctrl_config_ctrl_streams(ctrl, ctrl->panel);
+
+	msm_dp_ctrl_config_misc1_misc0(ctrl, ctrl->panel);
 
 	msm_dp_panel_timing_cfg(ctrl->panel, ctrl->msm_dp_ctrl.wide_bus_en);
 }

-- 
2.43.0


  parent reply	other threads:[~2026-07-20  6:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  6:08 [PATCH v8 00/15] drm/msm/dp: Prerequisite cleanup for upcoming MST support Yongxing Mou
2026-07-20  6:08 ` [PATCH v8 01/15] drm/msm/dp: remove cached drm_edid from panel Yongxing Mou
2026-07-20  6:08 ` [PATCH v8 02/15] drm/msm/dp: drop deprecated .mode_set() and use .atomic_enable Yongxing Mou
2026-07-20  6:33   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 03/15] drm/msm/dp: move mode setup into msm_dp_panel_init_panel_info() Yongxing Mou
2026-07-20  6:08 ` [PATCH v8 04/15] drm/msm/dp: split msm_dp_ctrl_config_ctrl() into link parts and stream parts Yongxing Mou
2026-07-20  6:08 ` Yongxing Mou [this message]
2026-07-20  6:08 ` [PATCH v8 06/15] drm/msm/dp: split link setup from source params Yongxing Mou
2026-07-20  6:27   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 07/15] drm/msm/dp: move the pixel clock control to its own API Yongxing Mou
2026-07-20  6:26   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 08/15] drm/msm/dp: break up dp_display_enable into two parts Yongxing Mou
2026-07-20  6:08 ` [PATCH v8 09/15] drm/msm/dp: re-arrange dp_display_disable() into functional parts Yongxing Mou
2026-07-20  6:08 ` [PATCH v8 10/15] drm/msm/dp: allow dp_ctrl stream APIs to use any panel passed to it Yongxing Mou
2026-07-20  6:24   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 11/15] drm/msm/dp: split dp_ctrl_off() into stream and link parts Yongxing Mou
2026-07-20  6:26   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 12/15] drm/msm/dp: simplify link and clock disable sequence Yongxing Mou
2026-07-20  6:28   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 13/15] drm/msm/dp: make bridge helpers use dp_display to allow re-use Yongxing Mou
2026-07-20  6:27   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 14/15] drm/msm/dp: separate dp_display_prepare() into its own API Yongxing Mou
2026-07-20  6:27   ` sashiko-bot
2026-07-20  6:08 ` [PATCH v8 15/15] drm/msm/dp: pass panel to display enable/disable helpers Yongxing Mou

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=20260720-dp_mstclean-v8-5-bea261bf4e7d@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=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 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.