[PATCH 1/2] drm/atomic: check mode_changed *after* atomic_check
Daniel Vetter
daniel at ffwll.ch
Thu Nov 20 13:46:20 PST 2014
On Thu, Nov 20, 2014 at 03:55:06PM -0500, Rob Clark wrote:
> 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 at gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index fad2b93..5ae5b25 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -332,7 +332,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;
> @@ -430,10 +430,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];
> @@ -477,6 +473,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);
> --
> 1.9.3
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the dri-devel
mailing list