On Fri, May 22, 2026 at 03:58:06PM +0800, Yongxing Mou wrote: > > > On 5/21/2026 8:07 PM, Dmitry Baryshkov wrote: > > On Thu, May 21, 2026 at 07:34:32PM +0800, Yongxing Mou wrote: > > > > > > > > > On 4/12/2026 1:59 AM, Dmitry Baryshkov wrote: > > > > On Fri, Apr 10, 2026 at 05:33:49PM +0800, Yongxing Mou wrote: > > > > > From: Abhinav Kumar <[email protected]> > > > > > @@ -2740,7 +2741,8 @@ static int msm_dp_ctrl_clk_init(struct > > > > > msm_dp_ctrl *msm_dp_ctrl) > > > > > if (rc) > > > > > return rc; > > > > > - for (i = DP_STREAM_0; i < DP_STREAM_MAX; i++) { > > > > > + ctrl->num_pixel_clks = 0; > > > > > + for (i = DP_STREAM_0; i < max_stream; i++) { > > > > > > > > Why? I think the code was fine with getting up to DP_STREAM_MAX clocks. > > > Sure.. will change max_stream -> DP_STREAM_MAX next version. > > > > In fact, I'd rather use that instead of the hardcoded value for > > > > determining how many streams can be there. Think of the old DTs which > > > > didn't have extra stream clocks. We still need to support those. > > > > > > > The current logic only assigns num streams to dp->max_stream when > > > desc->mst_streams == num_pixel_clks, otherwise set to 1 which mean sst. > > > I would like to introduce a switch in the driver to control the number of > > > streams, rather than having it fully determined by the DTs. > > > > Why? > > > 1. In some scenarios, even if the hardware supports up to 4-stream MST, we > may not want to enable all streams (e.g., LeMans: 2xDSI + 4xMST + 2xMST, but > it only has a 6-layer mixer).
6 layer mixers, not 6-layer mixer (the latter means the mixer which supports 6 blending layers). Even with 6 LMs, there is no reason to prevent users from using the hardware in the way they want. Any artifical limitations are NAKed. > 2. Currently, the DTs for all platforms have already been merged, and for > some legacy platforms, not sure if all platforms MST will work. You are a part of the display team of the SoC manufacturer. You can test the platforms and make sure that MST will work. I should be able to help you with some of those, maybe except the MSM8998 / SDM660 generation. > If my understanding is incorrect, please feel free to correct me. Thanks. > > > Do you think it would be acceptable to use: > > > dp->max_stream = min(num_pixel_clks, desc->mst_streams)? > > > > We know that num_pixel_clks <= desc->mst_streams. Otherwise DT is wrong > > and should not have been comitted. So, the min(a,b) has a known return > > value of num_pixel_clks. > > > > > > > > > > ctrl->pixel_clk[i] = devm_clk_get(dev, pixel_clks[i]); > > > > > if (i == 0 && IS_ERR(ctrl->pixel_clk[i])) > > > -- With best wishes Dmitry
