net/mlx5: Fix autogroups groups num not decreasing
[cascardo/linux.git] / include / drm / drm_modeset_helper_vtables.h
index 686feec..10e449c 100644 (file)
@@ -266,6 +266,8 @@ struct drm_crtc_helper_funcs {
         * disable anything at the CRTC level. To ensure that runtime PM
         * handling (using either DPMS or the new "ACTIVE" property) works
         * @disable must be the inverse of @enable for atomic drivers.
+        * Atomic drivers should consider to use @atomic_disable instead of
+        * this one.
         *
         * NOTE:
         *
@@ -391,6 +393,28 @@ struct drm_crtc_helper_funcs {
         */
        void (*atomic_flush)(struct drm_crtc *crtc,
                             struct drm_crtc_state *old_crtc_state);
+
+       /**
+        * @atomic_disable:
+        *
+        * This callback should be used to disable the CRTC. With the atomic
+        * drivers it is called after all encoders connected to this CRTC have
+        * been shut off already using their own ->disable hook. If that
+        * sequence is too simple drivers can just add their own hooks and call
+        * it from this CRTC callback here by looping over all encoders
+        * connected to it using for_each_encoder_on_crtc().
+        *
+        * This hook is used only by atomic helpers. Atomic drivers don't
+        * need to implement it if there's no need to disable anything at the
+        * CRTC level.
+        *
+        * Comparing to @disable, this one provides the additional input
+        * parameter @old_crtc_state which could be used to access the old
+        * state. Atomic drivers should consider to use this one instead
+        * of @disable.
+        */
+       void (*atomic_disable)(struct drm_crtc *crtc,
+                              struct drm_crtc_state *old_crtc_state);
 };
 
 /**
@@ -855,7 +879,7 @@ struct drm_plane_helper_funcs {
         * everything else must complete successfully.
         */
        int (*prepare_fb)(struct drm_plane *plane,
-                         const struct drm_plane_state *new_state);
+                         struct drm_plane_state *new_state);
        /**
         * @cleanup_fb:
         *
@@ -866,7 +890,7 @@ struct drm_plane_helper_funcs {
         * transitional plane helpers, but it is optional.
         */
        void (*cleanup_fb)(struct drm_plane *plane,
-                          const struct drm_plane_state *old_state);
+                          struct drm_plane_state *old_state);
 
        /**
         * @atomic_check: