On Tue, 19 Oct 2021 at 18:30, Vinod Koul <vkoul@xxxxxxxxxx> wrote: > > On 14-10-21, 17:11, Dmitry Baryshkov wrote: > > On 07/10/2021 10:08, Vinod Koul wrote: > > > > +static int _dpu_rm_reserve_dsc(struct dpu_rm *rm, > > > + struct dpu_global_state *global_state, > > > + struct drm_encoder *enc) > > > +{ > > > + struct msm_drm_private *priv; > > > + > > > + priv = enc->dev->dev_private; > > > + > > > + if (!priv) > > > + return -EIO; > > > + > > > + /* check if DSC is supported */ > > > + if (!priv->dsc) > > > + return 0; > > > + > > > + /* check if DSC 0 & 1 and allocated or not */ > > > + if (global_state->dsc_to_enc_id[0] || global_state->dsc_to_enc_id[1]) { > > > + DPU_ERROR("DSC 0|1 is already allocated\n"); > > > + return -EIO; > > > + } > > > + > > > + global_state->dsc_to_enc_id[0] = enc->base.id; > > > + global_state->dsc_to_enc_id[1] = enc->base.id; > > > > Still hardcoding DSC_0 and DSC_1. > > Yes! > > > Could you please add num_dsc to the topology and allocate the requested > > amount of DSC blocks? Otherwise this would break for the DSI + DP case. > > It wont as we check for dsc and dont proceed, so it cant make an impact > in non dsc case. > > Nevertheless I agree with you, so I am making it based on dsc defined in > topology. Do we need additional field for num_dsc in topology, num_enc > should be it, right? I'd vote for the separate num_dsc. -- With best wishes Dmitry