From: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: freedreno
<freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"Kristian H. Kristensen"
<hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Jeykumar Sankaran
<jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
linux-arm-msm
<linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [DPU PATCH] drm/msm: Remove dpu_plane_state->defer_prepare_fb
Date: Thu, 22 Feb 2018 16:00:25 -0500 [thread overview]
Message-ID: <20180222210025.GG223881@art_vandelay> (raw)
In-Reply-To: <CAF6AEGuZyFrdRvAVOdx2tV8JaCPRhgteiJj6CFePvs_txXcw4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, Feb 22, 2018 at 03:02:44PM -0500, Rob Clark wrote:
> On Wed, Feb 21, 2018 at 2:43 PM, Sean Paul <seanpaul@chromium.org> wrote:
> > It's never set to true, so none of this code is ever run.
> >
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
>
> I guess if it was ever set to true, that got ripped out with the
> secure buffer support. And when that ever gets re-introduced, I hope
> we can avoid the need for transitions, since it does seem to introduce
> a lot more complexity.
Yeah, I think we'd want to re-evaluate anyways since it seemed like a lot of
copypasta sprinkled around. At the _very least_ we'd want to add a helper to
handle the prepare and state tracking.
>
> Reviewed-by: Rob Clark <robdclark@gmail.com>
Thanks!
Sean
>
> > ---
> > drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 65 -----------------------
> > drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 2 -
> > 2 files changed, 67 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> > index 9b684e94e8aa..cbda7dbf8725 100644
> > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> > @@ -894,22 +894,6 @@ static inline void _dpu_plane_set_scanout(struct drm_plane *plane,
> > return;
> > }
> >
> > - /*
> > - * framebuffer prepare is deferred for prepare_fb calls that
> > - * happen during the transition from secure to non-secure.
> > - * Handle the prepare at this point for such cases. This can be
> > - * expected for one or two frames during the transition.
> > - */
> > - if (aspace && pstate->defer_prepare_fb) {
> > - ret = msm_framebuffer_prepare(fb, pstate->aspace);
> > - if (ret) {
> > - DPU_ERROR_PLANE(pdpu,
> > - "failed to prepare framebuffer %d\n", ret);
> > - return;
> > - }
> > - pstate->defer_prepare_fb = false;
> > - }
> > -
> > ret = dpu_format_populate_layout(aspace, fb, &pipe_cfg->layout);
> > if (ret == -EAGAIN)
> > DPU_DEBUG_PLANE(pdpu, "not updating same src addrs\n");
> > @@ -2103,13 +2087,6 @@ static int dpu_plane_rot_prepare_fb(struct drm_plane *plane,
> > }
> > }
> >
> > - if (new_pstate->defer_prepare_fb) {
> > - DPU_DEBUG(
> > - "plane%d, domain not attached, prepare fb handled later\n",
> > - plane->base.id);
> > - return 0;
> > - }
> > -
> > /* prepare rotator input buffer */
> > ret = msm_framebuffer_prepare(new_state->fb, new_pstate->aspace);
> > if (ret) {
> > @@ -2401,34 +2378,6 @@ static void dpu_plane_rot_atomic_update(struct drm_plane *plane,
> > if (!rstate->out_sbuf || !rstate->rot_hw)
> > return;
> >
> > - /*
> > - * framebuffer prepare is deferred for prepare_fb calls that
> > - * happen during the transition from secure to non-secure.
> > - * Handle the prepare at this point for rotator in such cases.
> > - * This can be expected for one or two frames during the transition.
> > - */
> > - if (pstate->aspace && pstate->defer_prepare_fb) {
> > - /* prepare rotator input buffer */
> > - ret = msm_framebuffer_prepare(state->fb, pstate->aspace);
> > - if (ret) {
> > - DPU_ERROR("p%d failed to prepare input fb %d\n",
> > - plane->base.id, ret);
> > - return;
> > - }
> > -
> > - /* prepare rotator output buffer */
> > - if (dpu_plane_enabled(state) && rstate->out_fb) {
> > - ret = msm_framebuffer_prepare(rstate->out_fb,
> > - pstate->aspace);
> > - if (ret) {
> > - DPU_ERROR(
> > - "p%d failed to prepare inline fb %d\n",
> > - plane->base.id, ret);
> > - goto error_prepare_output_buffer;
> > - }
> > - }
> > - }
> > -
> > dpu_plane_rot_submit_command(plane, state, DPU_HW_ROT_CMD_COMMIT);
> >
> > return;
> > @@ -2796,26 +2745,12 @@ static int dpu_plane_prepare_fb(struct drm_plane *plane,
> > /* cache aspace */
> > pstate->aspace = aspace;
> >
> > - /*
> > - * when transitioning from secure to non-secure,
> > - * plane->prepare_fb happens before the commit. In such case,
> > - * defer the prepare_fb and handled it late, during the commit
> > - * after attaching the domains as part of the transition
> > - */
> > - pstate->defer_prepare_fb = false;
> > -
> > ret = dpu_plane_rot_prepare_fb(plane, new_state);
> > if (ret) {
> > DPU_ERROR("failed to prepare rot framebuffer\n");
> > return ret;
> > }
> >
> > - if (pstate->defer_prepare_fb) {
> > - DPU_DEBUG_PLANE(pdpu,
> > - "domain not attached, prepare_fb handled later\n");
> > - return 0;
> > - }
> > -
> > new_rstate = &to_dpu_plane_state(new_state)->rot;
> >
> > if (pstate->aspace) {
> > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
> > index 8c49412d460d..717dfe05c6ee 100644
> > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
> > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
> > @@ -129,7 +129,6 @@ enum dpu_plane_sclcheck_state {
> > * @multirect_index: index of the rectangle of SSPP
> > * @multirect_mode: parallel or time multiplex multirect mode
> > * @pending: whether the current update is still pending
> > - * @defer_prepare_fb: indicate if prepare_fb call was deferred
> > * @scaler3_cfg: configuration data for scaler3
> > * @pixel_ext: configuration data for pixel extensions
> > * @scaler_check_state: indicates status of user provided pixel extension data
> > @@ -147,7 +146,6 @@ struct dpu_plane_state {
> > uint32_t multirect_index;
> > uint32_t multirect_mode;
> > bool pending;
> > - bool defer_prepare_fb;
> >
> > /* scaler configuration */
> > struct dpu_hw_scaler3_cfg scaler3_cfg;
> > --
> > 2.16.1.291.g4437f3f132-goog
> >
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
prev parent reply other threads:[~2018-02-22 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 19:43 [DPU PATCH] drm/msm: Remove dpu_plane_state->defer_prepare_fb Sean Paul
[not found] ` <20180221194342.120351-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-02-22 20:02 ` Rob Clark
[not found] ` <CAF6AEGuZyFrdRvAVOdx2tV8JaCPRhgteiJj6CFePvs_txXcw4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-22 21:00 ` Sean Paul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180222210025.GG223881@art_vandelay \
--to=seanpaul-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox