aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-09-09 12:59:47 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-09-20 09:42:31 +0200
commit02d6f9a13ef3316da5c64540c5a376f07781c853 (patch)
tree0afb2baef084964ba9542ae4cda4068e4483b70a /include/drm
parentdrm/plane-helper: Warn if atomic drivers call non-atomic helpers (diff)
downloadwireguard-linux-02d6f9a13ef3316da5c64540c5a376f07781c853.tar.xz
wireguard-linux-02d6f9a13ef3316da5c64540c5a376f07781c853.zip
drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro
Provide DRM_PLANE_NON_ATOMIC_FUNCS, which initializes plane functions of non-atomic drivers to default values. The macro is not supposed to be used in new code, but helps with documenting and finding existing users. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Lyude Paul <lyude@redhat.com> # nouveau Link: https://patchwork.freedesktop.org/patch/msgid/20220909105947.6487-5-tzimmermann@suse.de
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_plane_helper.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
index 7760b27b0323..ff83d2621687 100644
--- a/include/drm/drm_plane_helper.h
+++ b/include/drm/drm_plane_helper.h
@@ -43,4 +43,16 @@ int drm_plane_helper_disable_primary(struct drm_plane *plane,
void drm_plane_helper_destroy(struct drm_plane *plane);
int drm_plane_helper_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state);
+/**
+ * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for non-atomic drivers
+ *
+ * This macro initializes plane functions for non-atomic drivers to default
+ * values. Non-atomic interfaces are deprecated and should not be used in new
+ * drivers.
+ */
+#define DRM_PLANE_NON_ATOMIC_FUNCS \
+ .update_plane = drm_plane_helper_update_primary, \
+ .disable_plane = drm_plane_helper_disable_primary, \
+ .destroy = drm_plane_helper_destroy
+
#endif