Skip to content

Commit

Permalink
drm/atomic: check mode_changed *after* atomic_check
Browse files Browse the repository at this point in the history
The intention is that drivers can set crtc_state->mode_changed in their
atomic_check() fxns if they encounter a scenario that requires full
modeset.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Rob Clark committed Nov 21, 2014
1 parent 4dd14fe commit 934ce1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/drm_atomic_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ mode_fixup(struct drm_atomic_state *state)
}

static int
drm_atomic_helper_check_prepare(struct drm_device *dev,
drm_atomic_helper_check_modeset(struct drm_device *dev,
struct drm_atomic_state *state)
{
int ncrtcs = dev->mode_config.num_crtc;
Expand Down Expand Up @@ -428,10 +428,6 @@ int drm_atomic_helper_check(struct drm_device *dev,
int ncrtcs = dev->mode_config.num_crtc;
int i, ret = 0;

ret = drm_atomic_helper_check_prepare(dev, state);
if (ret)
return ret;

for (i = 0; i < nplanes; i++) {
struct drm_plane_helper_funcs *funcs;
struct drm_plane *plane = state->planes[i];
Expand Down Expand Up @@ -475,6 +471,10 @@ int drm_atomic_helper_check(struct drm_device *dev,
}
}

ret = drm_atomic_helper_check_modeset(dev, state);
if (ret)
return ret;

return ret;
}
EXPORT_SYMBOL(drm_atomic_helper_check);
Expand Down

0 comments on commit 934ce1c

Please sign in to comment.