lkml.org 
[lkml]   [2021]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 04/11] drm/msm/disp/dpu1: Add DSC support in RM
On Tue, 19 Oct 2021 at 18:30, Vinod Koul <vkoul@kernel.org> 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

\
 
 \ /
  Last update: 2021-10-19 17:54    [W:0.096 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site