drm/atomic-helper: make drm_gem_plane_helper_prepare_fb the default
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Jun 2021 16:22:00 +0000 (18:22 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 24 Jun 2021 13:35:13 +0000 (15:35 +0200)
commit7d30963fd191b7f2ea158e1abca8f05b41cc30d8
tree9944ef9b33473dc01251b7fc7597f90f84c0236a
parent05459351ce307f6ba0e0221968b1e15b97d3b075
drm/atomic-helper: make drm_gem_plane_helper_prepare_fb the default

There's a bunch of atomic drivers who don't do this quite correctly,
luckily most of them aren't in wide use or people would have noticed
the tearing.

By making this the default we avoid the constant audit pain and can
additionally remove a ton of lines from vfuncs for a bit more clarity
in smaller drivers.

While at it complain if there's a cleanup_fb hook but no prepare_fb
hook, because that makes no sense. I haven't found any driver which
violates this, but better safe than sorry.

Subsequent patches will reap the benefits.

v2: It's neither ... nor, not not (Sam)

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210623162200.3372056-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_gem_atomic_helper.c
include/drm/drm_modeset_helper_vtables.h