Skip to content

Commit ba94ce1

Browse files
committed
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_modeset_enables()
drm_atomic_helper_commit_modeset_enables() enables all outputs 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
1 parent f302d33 commit ba94ce1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/gpu/drm/drm_atomic_helper.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
14861486
/**
14871487
* drm_atomic_helper_commit_modeset_enables - modeset commit to enable outputs
14881488
* @dev: DRM device
1489-
* @old_state: atomic state object with old state structures
1489+
* @state: atomic state object being committed
14901490
*
14911491
* This function enables all the outputs with the new configuration which had to
14921492
* be turned off for the update.
@@ -1498,7 +1498,7 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
14981498
* PM since planes updates then only happen when the CRTC is actually enabled.
14991499
*/
15001500
void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
1501-
struct drm_atomic_state *old_state)
1501+
struct drm_atomic_state *state)
15021502
{
15031503
struct drm_crtc *crtc;
15041504
struct drm_crtc_state *old_crtc_state;
@@ -1507,7 +1507,7 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
15071507
struct drm_connector_state *new_conn_state;
15081508
int i;
15091509

1510-
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
1510+
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
15111511
const struct drm_crtc_helper_funcs *funcs;
15121512

15131513
/* Need to filter out CRTCs where only planes change. */
@@ -1523,13 +1523,13 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
15231523
drm_dbg_atomic(dev, "enabling [CRTC:%d:%s]\n",
15241524
crtc->base.id, crtc->name);
15251525
if (funcs->atomic_enable)
1526-
funcs->atomic_enable(crtc, old_state);
1526+
funcs->atomic_enable(crtc, state);
15271527
else if (funcs->commit)
15281528
funcs->commit(crtc);
15291529
}
15301530
}
15311531

1532-
for_each_new_connector_in_state(old_state, connector, new_conn_state, i) {
1532+
for_each_new_connector_in_state(state, connector, new_conn_state, i) {
15331533
const struct drm_encoder_helper_funcs *funcs;
15341534
struct drm_encoder *encoder;
15351535
struct drm_bridge *bridge;
@@ -1552,21 +1552,21 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
15521552
* it away), so we won't call enable hooks twice.
15531553
*/
15541554
bridge = drm_bridge_chain_get_first_bridge(encoder);
1555-
drm_atomic_bridge_chain_pre_enable(bridge, old_state);
1555+
drm_atomic_bridge_chain_pre_enable(bridge, state);
15561556

15571557
if (funcs) {
15581558
if (funcs->atomic_enable)
1559-
funcs->atomic_enable(encoder, old_state);
1559+
funcs->atomic_enable(encoder, state);
15601560
else if (funcs->enable)
15611561
funcs->enable(encoder);
15621562
else if (funcs->commit)
15631563
funcs->commit(encoder);
15641564
}
15651565

1566-
drm_atomic_bridge_chain_enable(bridge, old_state);
1566+
drm_atomic_bridge_chain_enable(bridge, state);
15671567
}
15681568

1569-
drm_atomic_helper_commit_writebacks(dev, old_state);
1569+
drm_atomic_helper_commit_writebacks(dev, state);
15701570
}
15711571
EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_enables);
15721572

0 commit comments

Comments
 (0)