drm/atomic: Add __drm_atomic_helper_plane_reset
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Sat, 4 Aug 2018 16:15:21 +0000 (17:15 +0100)
committerLiu Ying <victor.liu@nxp.com>
Fri, 20 Sep 2019 02:01:23 +0000 (10:01 +0800)
commitb8fe777d729a2f1597e638cf588bcdd42521ed83
tree629bcfc92f5418dee0290c00fc5f6f0af5e3f5d3
parent393e7e1ae2da9934f48fe12431b8dee72802bb38
drm/atomic: Add __drm_atomic_helper_plane_reset

There are a lot of drivers that subclass drm_plane_state, all of them
duplicate the code that links together the plane with plane_state.

On top of that, drivers that enable core properties also have to
duplicate the code for initializing the properties to their default
values, which in all cases are the same as the defaults from core.

Change since v1:
- Make it consistent with the other helpers and require that both
  plane and state not be NULL, suggested by Boris Brezillon and
  Philipp Zabel.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-2-alexandru-cosmin.gheorghe@arm.com
(cherry picked from commit 7f4de521001f4ea705d505c9f91f58d0f56a0e6d)
(cherry picked from commit f09b192bf1316f0e65fa2dbb5ba4c82a558867ae)
drivers/gpu/drm/drm_atomic_helper.c
include/drm/drm_atomic_helper.h