]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Mon, 6 Aug 2018 10:41:04 +0000 (11:41 +0100)
commit20f1e59e1b285bd359d3b33bb566743b9ac9da54
tree7cdb8af7ea01cd506438b67f2d1d5fa89c1408f4
parent8c3878a5bd6af04f8c4e131ac8bb4657c1e5d49a
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
drivers/gpu/drm/drm_atomic_helper.c
include/drm/drm_atomic_helper.h