dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>,
	Lucas Stach <l.stach@pengutronix.de>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/8] drm/imx: Use __drm_atomic_helper_crtc_reset
Date: Thu, 2 Jul 2020 11:41:02 +0200	[thread overview]
Message-ID: <CAKMK7uGn3vBQzBehQuF36dmjTm3ocGekPPFMFNc40xK8hx1Gzg@mail.gmail.com> (raw)
In-Reply-To: <20200624072531.GU20149@phenom.ffwll.local>

On Wed, Jun 24, 2020 at 9:25 AM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Fri, Jun 12, 2020 at 06:00:51PM +0200, Daniel Vetter wrote:
> > Now also comes with the added benefit of doing a drm_crtc_vblank_off(),
> > which means vblank state isn't ill-defined and fail-y at driver load
> > before the first modeset on each crtc.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> > Cc: Fabio Estevam <festevam@gmail.com>
> > Cc: NXP Linux Team <linux-imx@nxp.com>
> > Cc: linux-arm-kernel@lists.infradead.org
>
> Ping for some ack/review on this pls.

Still looking for an ack here so I can land this entire pile.
-Daniel

>
> Thanks, Daniel
>
> > ---
> >  drivers/gpu/drm/imx/ipuv3-crtc.c | 21 ++++++++-------------
> >  1 file changed, 8 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c
> > index 63c0284f8b3c..02c2f848f2d1 100644
> > --- a/drivers/gpu/drm/imx/ipuv3-crtc.c
> > +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
> > @@ -109,20 +109,15 @@ static void imx_drm_crtc_reset(struct drm_crtc *crtc)
> >  {
> >       struct imx_crtc_state *state;
> >
> > -     if (crtc->state) {
> > -             if (crtc->state->mode_blob)
> > -                     drm_property_blob_put(crtc->state->mode_blob);
> > -
> > -             state = to_imx_crtc_state(crtc->state);
> > -             memset(state, 0, sizeof(*state));
> > -     } else {
> > -             state = kzalloc(sizeof(*state), GFP_KERNEL);
> > -             if (!state)
> > -                     return;
> > -             crtc->state = &state->base;
> > -     }
> > +     if (crtc->state)
> > +             __drm_atomic_helper_crtc_destroy_state(crtc->state);
> >
> > -     state->base.crtc = crtc;
> > +     kfree(to_imx_crtc_state(crtc->state));
> > +     crtc->state = NULL;
> > +
> > +     state = kzalloc(sizeof(*state), GFP_KERNEL);
> > +     if (state)
> > +             __drm_atomic_helper_crtc_reset(crtc, &state->base);
> >  }
> >
> >  static struct drm_crtc_state *imx_drm_crtc_duplicate_state(struct drm_crtc *crtc)
> > --
> > 2.26.2
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-07-02  9:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 16:00 [PATCH 1/8] drm/atomic-helper: reset vblank on crtc reset Daniel Vetter
2020-06-12 16:00 ` [PATCH 2/8] drm/amdgpu: Use __drm_atomic_helper_crtc_reset Daniel Vetter
2020-06-12 17:24   ` Harry Wentland
2020-06-12 17:41     ` Alex Deucher
2020-07-02 18:21       ` Daniel Vetter
2020-06-12 16:00 ` [PATCH 3/8] drm/imx: " Daniel Vetter
2020-06-24  7:25   ` Daniel Vetter
2020-07-02  9:41     ` Daniel Vetter [this message]
2020-07-02 10:12       ` Philipp Zabel
2020-06-12 16:00 ` [PATCH 4/8] drm/mtk: " Daniel Vetter
2020-06-23 16:01   ` Chun-Kuang Hu
2020-06-12 16:00 ` [PATCH 5/8] drm/vc4: " Daniel Vetter
2020-06-24  8:49   ` Maxime Ripard
2020-06-12 16:00 ` [PATCH 6/8] drm/vmwgfx: " Daniel Vetter
2020-06-12 20:32   ` kernel test robot
2020-06-12 20:49   ` [PATCH] " Daniel Vetter
2020-06-22 14:31     ` Roland Scheidegger
2020-06-12 23:21   ` [PATCH 6/8] " kernel test robot
2020-06-12 16:00 ` [PATCH 7/8] drm/mipi-dbi: Remove ->enabled Daniel Vetter
2020-06-13 13:42   ` Noralf Trønnes
2020-06-13 18:47   ` David Lechner
2020-06-15 21:31   ` [Intel-gfx] " Emil Velikov
2020-06-16  6:50     ` Daniel Vetter
2020-06-16 13:54       ` Emil Velikov
2020-06-16 17:16         ` Daniel Vetter
2020-06-24  7:18           ` Daniel Vetter
2020-06-12 16:00 ` [PATCH 8/8] drm/tiny/repaper: Drop edp->enabled Daniel Vetter
2020-06-13 13:43   ` Noralf Trønnes
2020-06-24  7:15     ` Daniel Vetter
2020-06-24  9:42 ` [PATCH 1/8] drm/atomic-helper: reset vblank on crtc reset Maxime Ripard
2020-07-02 11:27 ` Laurent Pinchart
2020-07-02 11:40   ` Daniel Vetter
2020-08-06  6:43     ` Tetsuo Handa
2020-08-06  6:57       ` daniel

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=CAKMK7uGn3vBQzBehQuF36dmjTm3ocGekPPFMFNc40xK8hx1Gzg@mail.gmail.com \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.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;
as well as URLs for NNTP newsgroup(s).