[PATCH] drm/atomic: Unconfuse the old_state mess in commmit_tail
Russell King - ARM Linux
linux at armlinux.org.uk
Mon Nov 21 23:53:55 UTC 2016
On Tue, Nov 22, 2016 at 08:51:11AM +0900, Gustavo Padovan wrote:
> 2016-11-21 Daniel Vetter <daniel.vetter at ffwll.ch>:
> > /**
> > * drm_atomic_helper_commit_tail - commit atomic update to hardware
> > - * @state: new modeset state to be committed
> > + * @old_state: atomic state object with old state structures
> > *
> > * This is the default implemenation for the ->atomic_commit_tail() hook of the
> > * &drm_mode_config_helper_funcs vtable.
> > @@ -1158,53 +1166,53 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_vblanks);
> > *
> > * For drivers supporting runtime PM the recommended sequence is instead ::
> > *
> > - * drm_atomic_helper_commit_modeset_disables(dev, state);
> > + * drm_atomic_helper_commit_modeset_disables(dev, old_state);
> > *
> > - * drm_atomic_helper_commit_modeset_enables(dev, state);
> > + * drm_atomic_helper_commit_modeset_enables(dev, old_state);
> > *
> > - * drm_atomic_helper_commit_planes(dev, state,
> > + * drm_atomic_helper_commit_planes(dev, old_state,
> > * DRM_PLANE_COMMIT_ACTIVE_ONLY);
> > *
> > * for committing the atomic update to hardware. See the kerneldoc entries for
> > * these three functions for more details.
> > */
> > -void drm_atomic_helper_commit_tail(struct drm_atomic_state *state)
> > +void drm_atomic_helper_commit_tail(struct drm_atomic_state *old_state)
>
> I thought we would commit the new state. Why the rename to old_state?
Because the argument is the _old_ state, and the new state can be
found in the various plane, crtc, etc structures.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
More information about the dri-devel
mailing list