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?

> 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

Reply via email to