Skip to content

Commit 488e107

Browse files
committed
drm/atomic-helper: Change parameter name of drm_atomic_helper_update_legacy_modeset_state()
drm_atomic_helper_update_legacy_modeset_state() updates all the legacy modeset pointers a connector, encoder or CRTC might have with the ones being setup by a given 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 72d1eda commit 488e107

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/gpu/drm/drm_atomic_helper.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
12771277
/**
12781278
* drm_atomic_helper_update_legacy_modeset_state - update legacy modeset state
12791279
* @dev: DRM device
1280-
* @old_state: atomic state object with old state structures
1280+
* @state: atomic state object being committed
12811281
*
12821282
* This function updates all the various legacy modeset state pointers in
12831283
* connectors, encoders and CRTCs.
@@ -1293,7 +1293,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
12931293
*/
12941294
void
12951295
drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
1296-
struct drm_atomic_state *old_state)
1296+
struct drm_atomic_state *state)
12971297
{
12981298
struct drm_connector *connector;
12991299
struct drm_connector_state *old_conn_state, *new_conn_state;
@@ -1302,7 +1302,7 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
13021302
int i;
13031303

13041304
/* clear out existing links and update dpms */
1305-
for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) {
1305+
for_each_oldnew_connector_in_state(state, connector, old_conn_state, new_conn_state, i) {
13061306
if (connector->encoder) {
13071307
WARN_ON(!connector->encoder->crtc);
13081308

@@ -1323,7 +1323,7 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
13231323
}
13241324

13251325
/* set new links */
1326-
for_each_new_connector_in_state(old_state, connector, new_conn_state, i) {
1326+
for_each_new_connector_in_state(state, connector, new_conn_state, i) {
13271327
if (!new_conn_state->crtc)
13281328
continue;
13291329

@@ -1335,15 +1335,15 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
13351335
}
13361336

13371337
/* set legacy state in the crtc structure */
1338-
for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
1338+
for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
13391339
struct drm_plane *primary = crtc->primary;
13401340
struct drm_plane_state *new_plane_state;
13411341

13421342
crtc->mode = new_crtc_state->mode;
13431343
crtc->enabled = new_crtc_state->enable;
13441344

13451345
new_plane_state =
1346-
drm_atomic_get_new_plane_state(old_state, primary);
1346+
drm_atomic_get_new_plane_state(state, primary);
13471347

13481348
if (new_plane_state && new_plane_state->crtc == crtc) {
13491349
crtc->x = new_plane_state->src_x >> 16;

0 commit comments

Comments
 (0)