Commit 934ce1c2 authored by Rob Clark's avatar Rob Clark

drm/atomic: check mode_changed *after* atomic_check

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: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4dd14fe6
...@@ -331,7 +331,7 @@ mode_fixup(struct drm_atomic_state *state) ...@@ -331,7 +331,7 @@ mode_fixup(struct drm_atomic_state *state)
} }
static int 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) struct drm_atomic_state *state)
{ {
int ncrtcs = dev->mode_config.num_crtc; int ncrtcs = dev->mode_config.num_crtc;
...@@ -428,10 +428,6 @@ int drm_atomic_helper_check(struct drm_device *dev, ...@@ -428,10 +428,6 @@ int drm_atomic_helper_check(struct drm_device *dev,
int ncrtcs = dev->mode_config.num_crtc; int ncrtcs = dev->mode_config.num_crtc;
int i, ret = 0; int i, ret = 0;
ret = drm_atomic_helper_check_prepare(dev, state);
if (ret)
return ret;
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 = state->planes[i];
...@@ -475,6 +471,10 @@ int drm_atomic_helper_check(struct drm_device *dev, ...@@ -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; return ret;
} }
EXPORT_SYMBOL(drm_atomic_helper_check); EXPORT_SYMBOL(drm_atomic_helper_check);
......
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