Re: [PATCH v4 13/39] drm/msm/dp: introduce stream_id for each DP panel

From: Yongxing Mou

Date: Wed May 20 2026 - 05:07:37 EST




On 4/12/2026 2:04 AM, Dmitry Baryshkov wrote:
On Fri, Apr 10, 2026 at 05:33:48PM +0800, Yongxing Mou wrote:
From: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>

With MST, each DP controller can handle multiple streams.
There shall be one dp_panel for each stream but the dp_display
object shall be shared among them. To represent this abstraction,
create a stream_id for each DP panel which shall be set by the
MST stream. For SST, default this to stream 0.

Use the stream ID to control the pixel clock of that respective
stream by extending the clock handles and state tracking of the
DP pixel clock to an array of max supported streams. The maximum
streams currently is 4.

Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
Signed-off-by: Yongxing Mou <yongxing.mou@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/dp/dp_ctrl.c | 57 +++++++++++++++++++++++--------------
drivers/gpu/drm/msm/dp/dp_ctrl.h | 2 +-
drivers/gpu/drm/msm/dp/dp_display.c | 24 ++++++++++++++--
drivers/gpu/drm/msm/dp/dp_display.h | 2 ++
drivers/gpu/drm/msm/dp/dp_panel.h | 11 +++++++
5 files changed, 71 insertions(+), 25 deletions(-)
@@ -2735,9 +2740,17 @@ static int msm_dp_ctrl_clk_init(struct msm_dp_ctrl *msm_dp_ctrl)
if (rc)
return rc;
- ctrl->pixel_clk = devm_clk_get(dev, "stream_pixel");
- if (IS_ERR(ctrl->pixel_clk))
- return PTR_ERR(ctrl->pixel_clk);
+ for (i = DP_STREAM_0; i < DP_STREAM_MAX; i++) {
+ ctrl->pixel_clk[i] = devm_clk_get(dev, pixel_clks[i]);
+
+ if (i == 0 && IS_ERR(ctrl->pixel_clk[i]))
+ return PTR_ERR(ctrl->pixel_clk[i]);
+
+ if (IS_ERR(ctrl->pixel_clk[i])) {
+ DRM_DEBUG_DP("stream %d pixel clock not exist", i);
+ break;
+ }

Almost missed it. If it is -EPROBE_DEFER, we must return an error. In
fact, I'd rather check for -ENOENT (or is it -ENODEV?) and pass all
other errors to the caller.

Thanks, will fix next version. i add logs change check this, if no this stream clk in dts, will return -ENOENT..
+ }
return 0;
}