Skip to content

Commit e64834b

Browse files
committed
drm/atomic-helper: Change parameter name of drm_atomic_helper_wait_for_vblanks()
drm_atomic_helper_wait_for_vblanks() waits for vblank events on all the CRTCs affected by a 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 <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-23-e71598f49c8f@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
1 parent 3fae6d2 commit e64834b

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
@@ -1668,7 +1668,7 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_fences);
16681668
/**
16691669
* drm_atomic_helper_wait_for_vblanks - wait for vblank on CRTCs
16701670
* @dev: DRM device
1671-
* @old_state: atomic state object with old state structures
1671+
* @state: atomic state object being committed
16721672
*
16731673
* Helper to, after atomic commit, wait for vblanks on all affected
16741674
* CRTCs (ie. before cleaning up old framebuffers using
@@ -1682,7 +1682,7 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_fences);
16821682
*/
16831683
void
16841684
drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
1685-
struct drm_atomic_state *old_state)
1685+
struct drm_atomic_state *state)
16861686
{
16871687
struct drm_crtc *crtc;
16881688
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
@@ -1693,10 +1693,10 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
16931693
* Legacy cursor ioctls are completely unsynced, and userspace
16941694
* relies on that (by doing tons of cursor updates).
16951695
*/
1696-
if (old_state->legacy_cursor_update)
1696+
if (state->legacy_cursor_update)
16971697
return;
16981698

1699-
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
1699+
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
17001700
if (!new_crtc_state->active)
17011701
continue;
17021702

@@ -1705,17 +1705,17 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
17051705
continue;
17061706

17071707
crtc_mask |= drm_crtc_mask(crtc);
1708-
old_state->crtcs[i].last_vblank_count = drm_crtc_vblank_count(crtc);
1708+
state->crtcs[i].last_vblank_count = drm_crtc_vblank_count(crtc);
17091709
}
17101710

1711-
for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {
1711+
for_each_old_crtc_in_state(state, crtc, old_crtc_state, i) {
17121712
if (!(crtc_mask & drm_crtc_mask(crtc)))
17131713
continue;
17141714

17151715
ret = wait_event_timeout(dev->vblank[i].queue,
1716-
old_state->crtcs[i].last_vblank_count !=
1717-
drm_crtc_vblank_count(crtc),
1718-
msecs_to_jiffies(100));
1716+
state->crtcs[i].last_vblank_count !=
1717+
drm_crtc_vblank_count(crtc),
1718+
msecs_to_jiffies(100));
17191719

17201720
WARN(!ret, "[CRTC:%d:%s] vblank wait timed out\n",
17211721
crtc->base.id, crtc->name);

0 commit comments

Comments
 (0)