[PATCH] drm/atomic: Add sanity checks to drm_atomic_helper_async_commit()

Daniel Vetter daniel at ffwll.ch
Tue Apr 3 09:23:08 UTC 2018


On Mon, Apr 02, 2018 at 11:45:31AM -0400, Sean Paul wrote:
> On Fri, Mar 30, 2018 at 11:39:05AM -0700, Eric Anholt wrote:
> > Boris Brezillon <boris.brezillon at bootlin.com> writes:
> > 
> > > ->atomic_async_update() requires that drivers update the plane->state
> > > object before returning. Make sure at least common properties have been
> > > updated.
> > >
> > > Cc: Gustavo Padovan <gustavo at padovan.org>
> > > Signed-off-by: Boris Brezillon <boris.brezillon at bootlin.com>
> > > ---
> > > Hello,
> > >
> > > This is a problem I had when debugging the VC4 ->atomic_async_update()
> > > implementation. The function was not updating plane->fb as it's
> > > supposed thus leaving plane->state->fb in an inconsistent state after
> > > each async update.
> > >
> > > Not sure if such WARN_ON_ONCE() are accepted in the core though, so
> > > I'll maintainers decide whether this is relevant or not and whether
> > > they prefer to have WARN_ON() or DRM_ERROR() messages.
> > 
> > I'm a huge fan of this kind of safety check.  FWIW,
> > 
> > Acked-by: Eric Anholt <eric at anholt.net>
> 
> Agreed, seems like a useful safety net to me.
> 
> Acked-by: Sean Paul <seanpaul at chromium.org>

Yeah, makes sense.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> 
> 
> 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> 
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS

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


More information about the dri-devel mailing list