]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/atomic-helper: Change parameter name of drm_atomic_helper_modeset_disables()
authorMaxime Ripard <mripard@kernel.org>
Thu, 13 Feb 2025 14:43:29 +0000 (15:43 +0100)
committerMaxime Ripard <mripard@kernel.org>
Wed, 19 Feb 2025 15:59:15 +0000 (16:59 +0100)
drm_atomic_helper_modeset_disables() disables all the outputs 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-10-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/drm_atomic_helper.c

index 284dab6958c7e02a61a6442188382b649c41dc62..e45e63240640ad0c56e48ca9eb6a43718e40dca2 100644 (file)
@@ -1439,7 +1439,7 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
 /**
  * drm_atomic_helper_commit_modeset_disables - modeset commit to disable outputs
  * @dev: DRM device
- * @old_state: atomic state object with old state structures
+ * @state: atomic state object being committed
  *
  * This function shuts down all the outputs that need to be shut down and
  * prepares them (if required) with the new mode.
@@ -1451,14 +1451,14 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
  * PM since planes updates then only happen when the CRTC is actually enabled.
  */
 void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev,
-                                              struct drm_atomic_state *old_state)
+                                              struct drm_atomic_state *state)
 {
-       disable_outputs(dev, old_state);
+       disable_outputs(dev, state);
 
-       drm_atomic_helper_update_legacy_modeset_state(dev, old_state);
-       drm_atomic_helper_calc_timestamping_constants(old_state);
+       drm_atomic_helper_update_legacy_modeset_state(dev, state);
+       drm_atomic_helper_calc_timestamping_constants(state);
 
-       crtc_set_mode(dev, old_state);
+       crtc_set_mode(dev, state);
 }
 EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_disables);