summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>2018-08-04 17:15:21 +0100
committerLiu Ying <victor.liu@nxp.com>2019-09-17 10:29:03 +0800
commitfc6b7c66215c98e43c4617e9c7b1e82a28ec2962 (patch)
treef60fbbc246609cf060d5f730b45bd076d1a06ca4 /include/drm
parentf5e3ce98644a63180065c2e1b63dcbd75bd71bd8 (diff)
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)
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_atomic_helper.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index d2b56cc657e9..f82529ca23b0 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -149,6 +149,8 @@ void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state);
void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
struct drm_crtc_state *state);
+void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
+ struct drm_plane_state *state);
void drm_atomic_helper_plane_reset(struct drm_plane *plane);
void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
struct drm_plane_state *state);