]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/atomic-helper: Change parameter name of disable_outputs()
authorMaxime Ripard <mripard@kernel.org>
Thu, 13 Feb 2025 14:43:30 +0000 (15:43 +0100)
committerMaxime Ripard <mripard@kernel.org>
Wed, 19 Feb 2025 15:59:16 +0000 (16:59 +0100)
disable_outputs() disables all connectors and CRTCs affected by a
commit. It takes the drm_atomic_state being committed as a parameter.

However, that parameter name is called as old_state, which is pretty
confusing. Let's rename that variable as state.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-11-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/drm_atomic_helper.c

index e45e63240640ad0c56e48ca9eb6a43718e40dca2..4571ddcfd3bf52213a7833fde91f7aabb2aaefab 100644 (file)
@@ -1160,7 +1160,7 @@ crtc_needs_disable(struct drm_crtc_state *old_state,
 }
 
 static void
-disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
+disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
 {
        struct drm_connector *connector;
        struct drm_connector_state *old_conn_state, *new_conn_state;
@@ -1168,7 +1168,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
        struct drm_crtc_state *old_crtc_state, *new_crtc_state;
        int i;
 
-       for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) {
+       for_each_oldnew_connector_in_state(state, connector, old_conn_state, new_conn_state, i) {
                const struct drm_encoder_helper_funcs *funcs;
                struct drm_encoder *encoder;
                struct drm_bridge *bridge;
@@ -1180,11 +1180,11 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
                if (!old_conn_state->crtc)
                        continue;
 
-               old_crtc_state = drm_atomic_get_old_crtc_state(old_state, old_conn_state->crtc);
+               old_crtc_state = drm_atomic_get_old_crtc_state(state, old_conn_state->crtc);
 
                if (new_conn_state->crtc)
                        new_crtc_state = drm_atomic_get_new_crtc_state(
-                                               old_state,
+                                               state,
                                                new_conn_state->crtc);
                else
                        new_crtc_state = NULL;
@@ -1211,12 +1211,12 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
                 * it away), so we won't call disable hooks twice.
                 */
                bridge = drm_bridge_chain_get_first_bridge(encoder);
-               drm_atomic_bridge_chain_disable(bridge, old_state);
+               drm_atomic_bridge_chain_disable(bridge, state);
 
                /* Right function depends upon target state. */
                if (funcs) {
                        if (funcs->atomic_disable)
-                               funcs->atomic_disable(encoder, old_state);
+                               funcs->atomic_disable(encoder, state);
                        else if (new_conn_state->crtc && funcs->prepare)
                                funcs->prepare(encoder);
                        else if (funcs->disable)
@@ -1225,10 +1225,10 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
                                funcs->dpms(encoder, DRM_MODE_DPMS_OFF);
                }
 
-               drm_atomic_bridge_chain_post_disable(bridge, old_state);
+               drm_atomic_bridge_chain_post_disable(bridge, state);
        }
 
-       for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
+       for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
                const struct drm_crtc_helper_funcs *funcs;
                int ret;
 
@@ -1249,7 +1249,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
                if (new_crtc_state->enable && funcs->prepare)
                        funcs->prepare(crtc);
                else if (funcs->atomic_disable)
-                       funcs->atomic_disable(crtc, old_state);
+                       funcs->atomic_disable(crtc, state);
                else if (funcs->disable)
                        funcs->disable(crtc);
                else if (funcs->dpms)