Commit b0fcfc89 authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

drm/atomic_helper: Make it clear that commit_planes gets the old state

Oversight from my kerneldoc cleanup when doing the original atomic
helper series - I've only applied this clarification to the modeset
related helpers, and not the plane update code. Remedy this asap.
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 3758b341
...@@ -976,18 +976,18 @@ EXPORT_SYMBOL(drm_atomic_helper_prepare_planes); ...@@ -976,18 +976,18 @@ EXPORT_SYMBOL(drm_atomic_helper_prepare_planes);
/** /**
* drm_atomic_helper_commit_planes - commit plane state * drm_atomic_helper_commit_planes - commit plane state
* @dev: DRM device * @dev: DRM device
* @state: atomic state * @old_state: atomic state object with old state structures
* *
* This function commits the new plane state using the plane and atomic helper * This function commits the new plane state using the plane and atomic helper
* functions for planes and crtcs. It assumes that the atomic state has already * functions for planes and crtcs. It assumes that the atomic state has already
* been pushed into the relevant object state pointers, since this step can no * been pushed into the relevant object state pointers, since this step can no
* longer fail. * longer fail.
* *
* It still requires the global state object @state to know which planes and * It still requires the global state object @old_state to know which planes and
* crtcs need to be updated though. * crtcs need to be updated though.
*/ */
void drm_atomic_helper_commit_planes(struct drm_device *dev, void drm_atomic_helper_commit_planes(struct drm_device *dev,
struct drm_atomic_state *state) struct drm_atomic_state *old_state)
{ {
int nplanes = dev->mode_config.num_total_plane; int nplanes = dev->mode_config.num_total_plane;
int ncrtcs = dev->mode_config.num_crtc; int ncrtcs = dev->mode_config.num_crtc;
...@@ -995,7 +995,7 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev, ...@@ -995,7 +995,7 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
for (i = 0; i < ncrtcs; i++) { for (i = 0; i < ncrtcs; i++) {
struct drm_crtc_helper_funcs *funcs; struct drm_crtc_helper_funcs *funcs;
struct drm_crtc *crtc = state->crtcs[i]; struct drm_crtc *crtc = old_state->crtcs[i];
if (!crtc) if (!crtc)
continue; continue;
...@@ -1010,7 +1010,7 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev, ...@@ -1010,7 +1010,7 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
for (i = 0; i < nplanes; i++) { for (i = 0; i < nplanes; i++) {
struct drm_plane_helper_funcs *funcs; struct drm_plane_helper_funcs *funcs;
struct drm_plane *plane = state->planes[i]; struct drm_plane *plane = old_state->planes[i];
if (!plane) if (!plane)
continue; continue;
...@@ -1025,7 +1025,7 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev, ...@@ -1025,7 +1025,7 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
for (i = 0; i < ncrtcs; i++) { for (i = 0; i < ncrtcs; i++) {
struct drm_crtc_helper_funcs *funcs; struct drm_crtc_helper_funcs *funcs;
struct drm_crtc *crtc = state->crtcs[i]; struct drm_crtc *crtc = old_state->crtcs[i];
if (!crtc) if (!crtc)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment