[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJpqqeN3A3rfT+T9CRbhhOb_gzH7SNxTNGF9uh2jwBZrwQQ@mail.gmail.com>
Date: Fri, 11 Oct 2024 10:26:19 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Jun Nie <jun.nie@...aro.org>
Cc: Rob Clark <robdclark@...il.com>, Abhinav Kumar <quic_abhinavk@...cinc.com>,
Sean Paul <sean@...rly.run>, Marijn Suijten <marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>, linux-arm-msm@...r.kernel.org,
dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 05/14] drm/msm/dpu: handle pipes as array
On Fri, 11 Oct 2024 at 10:18, Jun Nie <jun.nie@...aro.org> wrote:
>
> Dmitry Baryshkov <dmitry.baryshkov@...aro.org> 于2024年10月11日周五 15:10写道:
> >
> > On Fri, 11 Oct 2024 at 09:49, Jun Nie <jun.nie@...aro.org> wrote:
> > >
> > > Dmitry Baryshkov <dmitry.baryshkov@...aro.org> 于2024年10月10日周四 21:08写道:
> > > >
> > > > On Wed, Oct 09, 2024 at 04:50:18PM GMT, Jun Nie wrote:
> > > > > Store pipes in array with removing dedicated r_pipe. There are
> > > > > 2 pipes in a drm plane at most currently. While 4 pipes are
> > > > > needed for new usage case. This change generalize the handling
> > > > > to pipe pair and ease handling to another pipe pair later.
> > > > >
> > > > > Signed-off-by: Jun Nie <jun.nie@...aro.org>
> > > > > ---
> > > > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 34 +++---
> > > > > drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 167 ++++++++++++++++--------------
> > > > > drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 12 +--
> > > > > drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 10 +-
> > > > > 4 files changed, 111 insertions(+), 112 deletions(-)
> > > > >
> > > > > @@ -1410,17 +1416,24 @@ static void _dpu_plane_atomic_disable(struct drm_plane *plane)
> > > > > {
> > > > > struct drm_plane_state *state = plane->state;
> > > > > struct dpu_plane_state *pstate = to_dpu_plane_state(state);
> > > > > - struct dpu_sw_pipe *r_pipe = &pstate->r_pipe;
> > > > > + struct dpu_sw_pipe *pipe;
> > > > > + int i;
> > > > > +
> > > > > + for (i = 0; i < PIPES_PER_STAGE; i += 1) {
> > > > > + pipe = &pstate->pipe[i];
> > > > > + if (!pipe->sspp)
> > > > > + continue;
> > > > >
> > > > > - trace_dpu_plane_disable(DRMID(plane), false,
> > > > > - pstate->pipe.multirect_mode);
> > > > > + trace_dpu_plane_disable(DRMID(plane), false,
> > > > > + pstate->pipe[i].multirect_mode);
> > > > >
> > > > > - if (r_pipe->sspp) {
> > > > > - r_pipe->multirect_index = DPU_SSPP_RECT_SOLO;
> > > > > - r_pipe->multirect_mode = DPU_SSPP_MULTIRECT_NONE;
> > > > > + if (pipe->sspp && pipe->multirect_index == DPU_SSPP_RECT_1) {
> > > >
> > > > if (i > 1)
> > >
> > > Is there any case that pipe->multirect_index == DPU_SSPP_RECT_1 and i == 0 ?
> >
> > You are converting the code. Please don't change the logic. Original
> > code had separate handling for r_pipe. After your conversion it should
> > be if (i == 1) or if (i > 0), which means a typo in my review comment.
> >
> I see. You want to keep logic unchanged, with only handling the pipe in array.
> Handling to multiple pipe pairs can be added later.
Yes. Please never mix "rewrite" and "change the logic" together. It
complicates the review and is generally error-prone.
--
With best wishes
Dmitry
Powered by blists - more mailing lists