On 5/28/2026 11:22 PM, Dmitry Baryshkov wrote:
On Thu, May 28, 2026 at 06:40:25PM +0800, Yongxing Mou wrote:
The DP_CONFIGURATION_CTRL register contains both link-level and
stream-specific fields. Currently, msm_dp_ctrl_config_ctrl() configures
all of them together. Separate the configuration into link parts and
stream parts to support MST.
Signed-off-by: Yongxing Mou <[email protected]>
---
drivers/gpu/drm/msm/dp/dp_ctrl.c | 47 +++++++++++++++++++++++++++-------------
1 file changed, 32 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 86ef8c89ad44..cc00e8d2d6c7 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -388,26 +388,45 @@ void msm_dp_ctrl_push_idle(struct msm_dp_ctrl
*msm_dp_ctrl)
drm_dbg_dp(ctrl->drm_dev, "mainlink off\n");
}
-static void msm_dp_ctrl_config_ctrl(struct msm_dp_ctrl_private *ctrl)
+static void msm_dp_ctrl_config_ctrl_streams(struct msm_dp_ctrl_private *ctrl,
+ struct msm_dp_panel *msm_dp_panel)
{
u32 config = 0, tbd;
+
+ /*
+ * RMW: in SST, config_ctrl_link and config_ctrl_streams are called
+ * sequentially on the same thread. In MST, caller holds mst_lock.
There is neither MST nor mst_lock. Also being called on the same thread
means nothing, there can be another thread, executing the same code
concurretly. Please point out that they are called only from the
atomic_enable() callback, which is guarantted to be executed once at a
time.
Got it.. Will fix it next patch.
+ */
+ config = msm_dp_read_link(ctrl, REG_DP_CONFIGURATION_CTRL);