Skip to content

Commit 6d5815e

Browse files
committed
drm/atomic-helper: Fix commit_tail state variable name
Even though the commit_tail () drm_atomic_state parameter is called old_state, it's actually the state being committed which is confusing. It's even more confusing since the atomic_commit_tail hook being called by commit_tail() parameter is called state. Let's rename the variable from old_state to state to make it less confusing. Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
1 parent f82fe0d commit 6d5815e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/gpu/drm/drm_atomic_helper.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,9 +1830,9 @@ void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state *old_state)
18301830
}
18311831
EXPORT_SYMBOL(drm_atomic_helper_commit_tail_rpm);
18321832

1833-
static void commit_tail(struct drm_atomic_state *old_state)
1833+
static void commit_tail(struct drm_atomic_state *state)
18341834
{
1835-
struct drm_device *dev = old_state->dev;
1835+
struct drm_device *dev = state->dev;
18361836
const struct drm_mode_config_helper_funcs *funcs;
18371837
struct drm_crtc_state *new_crtc_state;
18381838
struct drm_crtc *crtc;
@@ -1854,33 +1854,33 @@ static void commit_tail(struct drm_atomic_state *old_state)
18541854
*/
18551855
start = ktime_get();
18561856

1857-
drm_atomic_helper_wait_for_fences(dev, old_state, false);
1857+
drm_atomic_helper_wait_for_fences(dev, state, false);
18581858

1859-
drm_atomic_helper_wait_for_dependencies(old_state);
1859+
drm_atomic_helper_wait_for_dependencies(state);
18601860

18611861
/*
18621862
* We cannot safely access new_crtc_state after
18631863
* drm_atomic_helper_commit_hw_done() so figure out which crtc's have
18641864
* self-refresh active beforehand:
18651865
*/
1866-
for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i)
1866+
for_each_new_crtc_in_state(state, crtc, new_crtc_state, i)
18671867
if (new_crtc_state->self_refresh_active)
18681868
new_self_refresh_mask |= BIT(i);
18691869

18701870
if (funcs && funcs->atomic_commit_tail)
1871-
funcs->atomic_commit_tail(old_state);
1871+
funcs->atomic_commit_tail(state);
18721872
else
1873-
drm_atomic_helper_commit_tail(old_state);
1873+
drm_atomic_helper_commit_tail(state);
18741874

18751875
commit_time_ms = ktime_ms_delta(ktime_get(), start);
18761876
if (commit_time_ms > 0)
1877-
drm_self_refresh_helper_update_avg_times(old_state,
1877+
drm_self_refresh_helper_update_avg_times(state,
18781878
(unsigned long)commit_time_ms,
18791879
new_self_refresh_mask);
18801880

1881-
drm_atomic_helper_commit_cleanup_done(old_state);
1881+
drm_atomic_helper_commit_cleanup_done(state);
18821882

1883-
drm_atomic_state_put(old_state);
1883+
drm_atomic_state_put(state);
18841884
}
18851885

18861886
static void commit_work(struct work_struct *work)

0 commit comments

Comments
 (0)