]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/drm/drm_plane_helper.h
Merge branch 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux into drm...
[karo-tx-linux.git] / include / drm / drm_plane_helper.h
index 5a7f9d4efb1d5456a66081cf338a9e25b44d68f9..4421f3f4ca8d9f44772d7e9a2a2163bb245e1326 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <drm/drm_rect.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_modeset_helper_vtables.h>
 
 /*
  * Drivers that don't allow primary plane scaling may pass this macro in place
  */
 #define DRM_PLANE_HELPER_NO_SCALING (1<<16)
 
-/**
- * DOC: plane helpers
- *
- * Helper functions to assist with creation and handling of CRTC primary
- * planes.
- */
-
 int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
                  const struct drm_crtc_funcs *funcs);
 
-/**
- * drm_plane_helper_funcs - helper operations for CRTCs
- * @prepare_fb: prepare a framebuffer for use by the plane
- * @cleanup_fb: cleanup a framebuffer when it's no longer used by the plane
- * @atomic_check: check that a given atomic state is valid and can be applied
- * @atomic_update: apply an atomic state to the plane (mandatory)
- * @atomic_disable: disable the plane
- *
- * The helper operations are called by the mid-layer CRTC helper.
- */
-struct drm_plane_helper_funcs {
-       int (*prepare_fb)(struct drm_plane *plane,
-                         const struct drm_plane_state *new_state);
-       void (*cleanup_fb)(struct drm_plane *plane,
-                          const struct drm_plane_state *old_state);
-
-       int (*atomic_check)(struct drm_plane *plane,
-                           struct drm_plane_state *state);
-       void (*atomic_update)(struct drm_plane *plane,
-                             struct drm_plane_state *old_state);
-       void (*atomic_disable)(struct drm_plane *plane,
-                              struct drm_plane_state *old_state);
-};
-
-static inline void drm_plane_helper_add(struct drm_plane *plane,
-                                       const struct drm_plane_helper_funcs *funcs)
-{
-       plane->helper_private = funcs;
-}
-
 int drm_plane_helper_check_update(struct drm_plane *plane,
                                  struct drm_crtc *crtc,
                                  struct drm_framebuffer *fb,