[RFC PATCH 6/6] drm/sun4i: use helper for arming crtc completion event

Daniel Vetter daniel at ffwll.ch
Thu Sep 29 09:44:35 UTC 2016


On Tue, Sep 27, 2016 at 11:09:53AM -0400, Alex Deucher wrote:
> On Tue, Sep 27, 2016 at 9:36 AM, Andrzej Hajda <a.hajda at samsung.com> wrote:
> > Replace custom code with core helper.
> >
> > Signed-off-by: Andrzej Hajda <a.hajda at samsung.com>
> 
> Nice cleanup.  Series is:
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

Replied to the helper patch with the reasons, but as-is nack.
-Daniel

> 
> > ---
> >  drivers/gpu/drm/sun4i/sun4i_crtc.c | 12 +-----------
> >  1 file changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> > index 4a19221..238c08c 100644
> > --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
> > +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> > @@ -51,22 +51,12 @@ static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc,
> >  {
> >         struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc);
> >         struct sun4i_drv *drv = scrtc->drv;
> > -       struct drm_pending_vblank_event *event = crtc->state->event;
> >
> >         DRM_DEBUG_DRIVER("Committing plane changes\n");
> >
> >         sun4i_backend_commit(drv->backend);
> >
> > -       if (event) {
> > -               crtc->state->event = NULL;
> > -
> > -               spin_lock_irq(&crtc->dev->event_lock);
> > -               if (drm_crtc_vblank_get(crtc) == 0)
> > -                       drm_crtc_arm_vblank_event(crtc, event);
> > -               else
> > -                       drm_crtc_send_vblank_event(crtc, event);
> > -               spin_unlock_irq(&crtc->dev->event_lock);
> > -       }
> > +       drm_crtc_arm_completion_event(crtc);
> >  }
> >
> >  static void sun4i_crtc_disable(struct drm_crtc *crtc)
> > --
> > 2.7.4
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list