]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/atomic-helper: Change parameter name of drm_atomic_helper_fake_vblank()
authorMaxime Ripard <mripard@kernel.org>
Thu, 13 Feb 2025 14:43:40 +0000 (15:43 +0100)
committerMaxime Ripard <mripard@kernel.org>
Wed, 19 Feb 2025 15:59:21 +0000 (16:59 +0100)
drm_atomic_helper_fake_vblank() fake a vblank event if needed when a new
commit is being applied. 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-21-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/drm_atomic_helper.c

index ece056ab07b41bc0de2fb4d10489f2403f1342ca..2ee7df6aca54b6e250c2a1847928a104a278a3a6 100644 (file)
@@ -2472,7 +2472,7 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_dependencies);
 
 /**
  * drm_atomic_helper_fake_vblank - fake VBLANK events if needed
- * @old_state: atomic state object with old state structures
+ * @state: atomic state object being committed
  *
  * This function walks all CRTCs and fakes VBLANK events on those with
  * &drm_crtc_state.no_vblank set to true and &drm_crtc_state.event != NULL.
@@ -2488,25 +2488,25 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_dependencies);
  * This is part of the atomic helper support for nonblocking commits, see
  * drm_atomic_helper_setup_commit() for an overview.
  */
-void drm_atomic_helper_fake_vblank(struct drm_atomic_state *old_state)
+void drm_atomic_helper_fake_vblank(struct drm_atomic_state *state)
 {
        struct drm_crtc_state *new_crtc_state;
        struct drm_crtc *crtc;
        int i;
 
-       for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
+       for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
                unsigned long flags;
 
                if (!new_crtc_state->no_vblank)
                        continue;
 
-               spin_lock_irqsave(&old_state->dev->event_lock, flags);
+               spin_lock_irqsave(&state->dev->event_lock, flags);
                if (new_crtc_state->event) {
                        drm_crtc_send_vblank_event(crtc,
                                                   new_crtc_state->event);
                        new_crtc_state->event = NULL;
                }
-               spin_unlock_irqrestore(&old_state->dev->event_lock, flags);
+               spin_unlock_irqrestore(&state->dev->event_lock, flags);
        }
 }
 EXPORT_SYMBOL(drm_atomic_helper_fake_vblank);