Skip to content

Commit 5af3ff9

Browse files
committed
drm/atomic-helper: Change parameter name of disable_outputs()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
1 parent 65d4638 commit 5af3ff9

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
@@ -1160,15 +1160,15 @@ crtc_needs_disable(struct drm_crtc_state *old_state,
11601160
}
11611161

11621162
static void
1163-
disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
1163+
disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
11641164
{
11651165
struct drm_connector *connector;
11661166
struct drm_connector_state *old_conn_state, *new_conn_state;
11671167
struct drm_crtc *crtc;
11681168
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
11691169
int i;
11701170

1171-
for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) {
1171+
for_each_oldnew_connector_in_state(state, connector, old_conn_state, new_conn_state, i) {
11721172
const struct drm_encoder_helper_funcs *funcs;
11731173
struct drm_encoder *encoder;
11741174
struct drm_bridge *bridge;
@@ -1180,11 +1180,11 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
11801180
if (!old_conn_state->crtc)
11811181
continue;
11821182

1183-
old_crtc_state = drm_atomic_get_old_crtc_state(old_state, old_conn_state->crtc);
1183+
old_crtc_state = drm_atomic_get_old_crtc_state(state, old_conn_state->crtc);
11841184

11851185
if (new_conn_state->crtc)
11861186
new_crtc_state = drm_atomic_get_new_crtc_state(
1187-
old_state,
1187+
state,
11881188
new_conn_state->crtc);
11891189
else
11901190
new_crtc_state = NULL;
@@ -1211,12 +1211,12 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
12111211
* it away), so we won't call disable hooks twice.
12121212
*/
12131213
bridge = drm_bridge_chain_get_first_bridge(encoder);
1214-
drm_atomic_bridge_chain_disable(bridge, old_state);
1214+
drm_atomic_bridge_chain_disable(bridge, state);
12151215

12161216
/* Right function depends upon target state. */
12171217
if (funcs) {
12181218
if (funcs->atomic_disable)
1219-
funcs->atomic_disable(encoder, old_state);
1219+
funcs->atomic_disable(encoder, state);
12201220
else if (new_conn_state->crtc && funcs->prepare)
12211221
funcs->prepare(encoder);
12221222
else if (funcs->disable)
@@ -1225,10 +1225,10 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
12251225
funcs->dpms(encoder, DRM_MODE_DPMS_OFF);
12261226
}
12271227

1228-
drm_atomic_bridge_chain_post_disable(bridge, old_state);
1228+
drm_atomic_bridge_chain_post_disable(bridge, state);
12291229
}
12301230

1231-
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
1231+
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
12321232
const struct drm_crtc_helper_funcs *funcs;
12331233
int ret;
12341234

@@ -1249,7 +1249,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
12491249
if (new_crtc_state->enable && funcs->prepare)
12501250
funcs->prepare(crtc);
12511251
else if (funcs->atomic_disable)
1252-
funcs->atomic_disable(crtc, old_state);
1252+
funcs->atomic_disable(crtc, state);
12531253
else if (funcs->disable)
12541254
funcs->disable(crtc);
12551255
else if (funcs->dpms)

0 commit comments

Comments
 (0)