From b78fc1c13587ec37ec67de072921a5527cc70ec3 Mon Sep 17 00:00:00 2001 From: Maxime Ripard <mripard@kernel.org> Date: Thu, 13 Feb 2025 15:43:37 +0100 Subject: [PATCH] drm/bridge: Change parameter name of drm_atomic_bridge_chain_pre_enable() drm_atomic_bridge_chain_pre_enable() enables all bridges affected by a new commit. It takes the drm_atomic_state being committed as a parameter. However, that parameter name is called (and documented) 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-18-e71598f49c8f@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org> --- drivers/gpu/drm/drm_bridge.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index b63ec3d0b2859..41bb3700ca7b6 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -678,10 +678,10 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, EXPORT_SYMBOL(drm_atomic_bridge_chain_post_disable); static void drm_atomic_bridge_call_pre_enable(struct drm_bridge *bridge, - struct drm_atomic_state *old_state) + struct drm_atomic_state *state) { - if (old_state && bridge->funcs->atomic_pre_enable) - bridge->funcs->atomic_pre_enable(bridge, old_state); + if (state && bridge->funcs->atomic_pre_enable) + bridge->funcs->atomic_pre_enable(bridge, state); else if (bridge->funcs->pre_enable) bridge->funcs->pre_enable(bridge); } @@ -690,7 +690,7 @@ static void drm_atomic_bridge_call_pre_enable(struct drm_bridge *bridge, * drm_atomic_bridge_chain_pre_enable - prepares for enabling all bridges in * the encoder chain * @bridge: bridge control structure - * @old_state: old atomic state + * @state: atomic state being committed * * Calls &drm_bridge_funcs.atomic_pre_enable (falls back on * &drm_bridge_funcs.pre_enable) op for all the bridges in the encoder chain, @@ -710,7 +710,7 @@ static void drm_atomic_bridge_call_pre_enable(struct drm_bridge *bridge, * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge, - struct drm_atomic_state *old_state) + struct drm_atomic_state *state) { struct drm_encoder *encoder; struct drm_bridge *iter, *next, *limit; @@ -749,11 +749,11 @@ void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge, */ break; - drm_atomic_bridge_call_pre_enable(next, old_state); + drm_atomic_bridge_call_pre_enable(next, state); } } - drm_atomic_bridge_call_pre_enable(iter, old_state); + drm_atomic_bridge_call_pre_enable(iter, state); if (iter->pre_enable_prev_first) /* Jump all bridges that we have already pre_enabled */ -- GitLab