[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjyRPhdoiLw4gOtD@matsya>
Date: Thu, 24 Mar 2022 21:11:50 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Marijn Suijten <marijn.suijten@...ainline.org>
Cc: Rob Clark <robdclark@...il.com>, linux-arm-msm@...r.kernel.org,
Bjorn Andersson <bjorn.andersson@...aro.org>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Jonathan Marek <jonathan@...ek.ca>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Abhinav Kumar <abhinavk@...eaurora.org>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org
Subject: Re: [REPOST PATCH v4 07/13] drm/msm/disp/dpu1: Add support for DSC
in encoder
On 23-03-22, 20:10, Vinod Koul wrote:
> On 17-02-22, 23:32, Marijn Suijten wrote:
> > On 2022-02-10 16:04:17, Vinod Koul wrote:
> > > +
> > > + slice_count = dsc->drm->slice_count;
> > > + slice_per_intf = DIV_ROUND_UP(width, dsc->drm->slice_width);
> > > +
> > > + /*
> > > + * If slice_count is greater than slice_per_intf then default to 1.
> > > + * This can happen during partial update.
> > > + */
> > > + if (slice_count > slice_per_intf)
> > > + slice_count = 1;
> > > +
> > > + bytes_in_slice = DIV_ROUND_UP(dsc->drm->slice_width *
> > > + dsc->drm->bits_per_pixel, 8);
> > > + total_bytes_per_intf = bytes_in_slice * slice_per_intf;
> > > +
> > > + dsc->eol_byte_num = total_bytes_per_intf % 3;
> > > + dsc->pclk_per_line = DIV_ROUND_UP(total_bytes_per_intf, 3);
> > > + dsc->bytes_in_slice = bytes_in_slice;
> > > + dsc->bytes_per_pkt = bytes_in_slice * slice_count;
> > > + dsc->pkt_per_line = slice_per_intf / slice_count;
> > > +}
> >
> > I've seen the same calculations duplicated twice in dsi code. Since the
> > msm_display_dsc_config struct is available in a header, perhaps a single
> > - easily reviewable and maintainable - calculation function should be
> > available there too?
>
> Let me try check if we can make it common..
I rechecked and we can actually remove this as we do this caln in timing
and update the dsc structure there. So this fn is dropped now
--
~Vinod
Powered by blists - more mailing lists