drm/atomic: Remove deprecated accessor macros
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 19 Jul 2017 14:39:20 +0000 (16:39 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 8 Sep 2017 08:39:37 +0000 (10:39 +0200)
Now that the last users have been converted, we can finally get rid of
for_each_obj_in_state, we have better macros to replace them with.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: David Airlie <airlied@linux.ie>
Link: https://patchwork.freedesktop.org/patch/msgid/20170719143920.25685-8-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
include/drm/drm_atomic.h
include/drm/drm_connector.h
include/drm/drm_crtc.h
include/drm/drm_plane.h

index 07a71daa35827072f1fcc855ae161d31fd95b981..5834580d75bca03689ff327fcbcdf611fce839c3 100644 (file)
@@ -569,31 +569,6 @@ int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);
 
 void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
 
-/**
- * for_each_connector_in_state - iterate over all connectors in an atomic update
- * @__state: &struct drm_atomic_state pointer
- * @connector: &struct drm_connector iteration cursor
- * @connector_state: &struct drm_connector_state iteration cursor
- * @__i: int iteration cursor, for macro-internal use
- *
- * This iterates over all connectors in an atomic update. Note that before the
- * software state is committed (by calling drm_atomic_helper_swap_state(), this
- * points to the new state, while afterwards it points to the old state. Due to
- * this tricky confusion this macro is deprecated.
- *
- * FIXME:
- *
- * Replace all usage of this with one of the explicit iterators below and then
- * remove this macro.
- */
-#define for_each_connector_in_state(__state, connector, connector_state, __i) \
-       for ((__i) = 0;                                                 \
-            (__i) < (__state)->num_connector &&                                \
-            ((connector) = (__state)->connectors[__i].ptr,                     \
-            (connector_state) = (__state)->connectors[__i].state, 1);  \
-            (__i)++)                                                   \
-               for_each_if (connector)
-
 /**
  * for_each_oldnew_connector_in_state - iterate over all connectors in an atomic update
  * @__state: &struct drm_atomic_state pointer
@@ -657,31 +632,6 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
             (__i)++)                                                   \
                for_each_if (connector)
 
-/**
- * for_each_crtc_in_state - iterate over all CRTCs in an atomic update
- * @__state: &struct drm_atomic_state pointer
- * @crtc: &struct drm_crtc iteration cursor
- * @crtc_state: &struct drm_crtc_state iteration cursor
- * @__i: int iteration cursor, for macro-internal use
- *
- * This iterates over all CRTCs in an atomic update. Note that before the
- * software state is committed (by calling drm_atomic_helper_swap_state(), this
- * points to the new state, while afterwards it points to the old state. Due to
- * this tricky confusion this macro is deprecated.
- *
- * FIXME:
- *
- * Replace all usage of this with one of the explicit iterators below and then
- * remove this macro.
- */
-#define for_each_crtc_in_state(__state, crtc, crtc_state, __i) \
-       for ((__i) = 0;                                         \
-            (__i) < (__state)->dev->mode_config.num_crtc &&    \
-            ((crtc) = (__state)->crtcs[__i].ptr,                       \
-            (crtc_state) = (__state)->crtcs[__i].state, 1);    \
-            (__i)++)                                           \
-               for_each_if (crtc_state)
-
 /**
  * for_each_oldnew_crtc_in_state - iterate over all CRTCs in an atomic update
  * @__state: &struct drm_atomic_state pointer
@@ -741,31 +691,6 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
             (__i)++)                                                   \
                for_each_if (crtc)
 
-/**
- * for_each_plane_in_state - iterate over all planes in an atomic update
- * @__state: &struct drm_atomic_state pointer
- * @plane: &struct drm_plane iteration cursor
- * @plane_state: &struct drm_plane_state iteration cursor
- * @__i: int iteration cursor, for macro-internal use
- *
- * This iterates over all planes in an atomic update. Note that before the
- * software state is committed (by calling drm_atomic_helper_swap_state(), this
- * points to the new state, while afterwards it points to the old state. Due to
- * this tricky confusion this macro is deprecated.
- *
- * FIXME:
- *
- * Replace all usage of this with one of the explicit iterators below and then
- * remove this macro.
- */
-#define for_each_plane_in_state(__state, plane, plane_state, __i)              \
-       for ((__i) = 0;                                                 \
-            (__i) < (__state)->dev->mode_config.num_total_plane &&     \
-            ((plane) = (__state)->planes[__i].ptr,                             \
-            (plane_state) = (__state)->planes[__i].state, 1);          \
-            (__i)++)                                                   \
-               for_each_if (plane_state)
-
 /**
  * for_each_oldnew_plane_in_state - iterate over all planes in an atomic update
  * @__state: &struct drm_atomic_state pointer
index 8837649d16e8f48aec2fc5cdc51678773afbd3ba..b34904dc8b9beb5ca068b6ebd63ae4cb03a97665 100644 (file)
@@ -895,8 +895,7 @@ struct drm_connector {
         * This is protected by @drm_mode_config.connection_mutex. Note that
         * nonblocking atomic commits access the current connector state without
         * taking locks. Either by going through the &struct drm_atomic_state
-        * pointers, see for_each_connector_in_state(),
-        * for_each_oldnew_connector_in_state(),
+        * pointers, see for_each_oldnew_connector_in_state(),
         * for_each_old_connector_in_state() and
         * for_each_new_connector_in_state(). Or through careful ordering of
         * atomic commit operations as implemented in the atomic helpers, see
index 901f5c054a2c4b44d1e4bb799cb2673fcef9ab2b..80c97210eda55c040617378e3937ab4fa6522099 100644 (file)
@@ -806,10 +806,10 @@ struct drm_crtc {
         * This is protected by @mutex. Note that nonblocking atomic commits
         * access the current CRTC state without taking locks. Either by going
         * through the &struct drm_atomic_state pointers, see
-        * for_each_crtc_in_state(), for_each_oldnew_crtc_in_state(),
-        * for_each_old_crtc_in_state() and for_each_new_crtc_in_state(). Or
-        * through careful ordering of atomic commit operations as implemented
-        * in the atomic helpers, see &struct drm_crtc_commit.
+        * for_each_oldnew_crtc_in_state(), for_each_old_crtc_in_state() and
+        * for_each_new_crtc_in_state(). Or through careful ordering of atomic
+        * commit operations as implemented in the atomic helpers, see
+        * &struct drm_crtc_commit.
         */
        struct drm_crtc_state *state;
 
index feb9941d0cdb1f90d51a5c677f18c2e3bb6f02a2..82a217bd77f05a8014f364b0e434ea486e665b61 100644 (file)
@@ -539,10 +539,10 @@ struct drm_plane {
         * This is protected by @mutex. Note that nonblocking atomic commits
         * access the current plane state without taking locks. Either by going
         * through the &struct drm_atomic_state pointers, see
-        * for_each_plane_in_state(), for_each_oldnew_plane_in_state(),
-        * for_each_old_plane_in_state() and for_each_new_plane_in_state(). Or
-        * through careful ordering of atomic commit operations as implemented
-        * in the atomic helpers, see &struct drm_crtc_commit.
+        * for_each_oldnew_plane_in_state(), for_each_old_plane_in_state() and
+        * for_each_new_plane_in_state(). Or through careful ordering of atomic
+        * commit operations as implemented in the atomic helpers, see
+        * &struct drm_crtc_commit.
         */
        struct drm_plane_state *state;