diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2019-12-03 15:15:11 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@collabora.com> | 2019-12-09 10:08:56 +0100 |
commit | f3fdbc721b8bc99c692716cf9a3cf061b5a49a18 (patch) | |
tree | 19989acd3ab282fa5c547ab4561df091f1a61abd /drivers/gpu/drm/drm_bridge.c | |
parent | ac877c64c87aff5d228cf53e40d8f68899afa815 (diff) | |
download | lwn-f3fdbc721b8bc99c692716cf9a3cf061b5a49a18.tar.gz lwn-f3fdbc721b8bc99c692716cf9a3cf061b5a49a18.zip |
drm/bridge: Clarify the atomic enable/disable hooks semantics
The [pre_]enable/[post_]disable hooks are passed the old atomic state.
Update the doc and rename the arguments to make it clear.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-8-boris.brezillon@collabora.com
Diffstat (limited to 'drivers/gpu/drm/drm_bridge.c')
-rw-r--r-- | drivers/gpu/drm/drm_bridge.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index b6517b4fa3d1..c2cf0c90fa26 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -389,7 +389,7 @@ EXPORT_SYMBOL(drm_bridge_chain_enable); /** * drm_atomic_bridge_chain_disable - disables all bridges in the encoder chain * @bridge: bridge control structure - * @state: atomic state being committed + * @old_state: old atomic state * * Calls &drm_bridge_funcs.atomic_disable (falls back on * &drm_bridge_funcs.disable) op for all the bridges in the encoder chain, @@ -399,7 +399,7 @@ EXPORT_SYMBOL(drm_bridge_chain_enable); * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_disable(struct drm_bridge *bridge, - struct drm_atomic_state *state) + struct drm_atomic_state *old_state) { struct drm_encoder *encoder; struct drm_bridge *iter; @@ -410,7 +410,7 @@ void drm_atomic_bridge_chain_disable(struct drm_bridge *bridge, encoder = bridge->encoder; list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { if (iter->funcs->atomic_disable) - iter->funcs->atomic_disable(iter, state); + iter->funcs->atomic_disable(iter, old_state); else if (iter->funcs->disable) iter->funcs->disable(iter); @@ -424,7 +424,7 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_disable); * drm_atomic_bridge_chain_post_disable - cleans up after disabling all bridges * in the encoder chain * @bridge: bridge control structure - * @state: atomic state being committed + * @old_state: old atomic state * * Calls &drm_bridge_funcs.atomic_post_disable (falls back on * &drm_bridge_funcs.post_disable) op for all the bridges in the encoder chain, @@ -434,7 +434,7 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_disable); * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, - struct drm_atomic_state *state) + struct drm_atomic_state *old_state) { struct drm_encoder *encoder; @@ -444,7 +444,7 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, encoder = bridge->encoder; list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) { if (bridge->funcs->atomic_post_disable) - bridge->funcs->atomic_post_disable(bridge, state); + bridge->funcs->atomic_post_disable(bridge, old_state); else if (bridge->funcs->post_disable) bridge->funcs->post_disable(bridge); } @@ -455,7 +455,7 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_post_disable); * drm_atomic_bridge_chain_pre_enable - prepares for enabling all bridges in * the encoder chain * @bridge: bridge control structure - * @state: atomic state being committed + * @old_state: old atomic state * * Calls &drm_bridge_funcs.atomic_pre_enable (falls back on * &drm_bridge_funcs.pre_enable) op for all the bridges in the encoder chain, @@ -465,7 +465,7 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_post_disable); * 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 *state) + struct drm_atomic_state *old_state) { struct drm_encoder *encoder; struct drm_bridge *iter; @@ -476,7 +476,7 @@ void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge, encoder = bridge->encoder; list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { if (iter->funcs->atomic_pre_enable) - iter->funcs->atomic_pre_enable(iter, state); + iter->funcs->atomic_pre_enable(iter, old_state); else if (iter->funcs->pre_enable) iter->funcs->pre_enable(iter); @@ -489,7 +489,7 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_pre_enable); /** * drm_atomic_bridge_chain_enable - enables all bridges in the encoder chain * @bridge: bridge control structure - * @state: atomic state being committed + * @old_state: old atomic state * * Calls &drm_bridge_funcs.atomic_enable (falls back on * &drm_bridge_funcs.enable) op for all the bridges in the encoder chain, @@ -499,7 +499,7 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_pre_enable); * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_enable(struct drm_bridge *bridge, - struct drm_atomic_state *state) + struct drm_atomic_state *old_state) { struct drm_encoder *encoder; @@ -509,7 +509,7 @@ void drm_atomic_bridge_chain_enable(struct drm_bridge *bridge, encoder = bridge->encoder; list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) { if (bridge->funcs->atomic_enable) - bridge->funcs->atomic_enable(bridge, state); + bridge->funcs->atomic_enable(bridge, old_state); else if (bridge->funcs->enable) bridge->funcs->enable(bridge); } |