diff mbox

[02/10] drm/i915: compute pipe_config earlier

Message ID 1361491014-13888-3-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Feb. 21, 2013, 11:56 p.m. UTC
To make decent modeset state checking possible (e.g. for the check
mode with atomic modesetting) we want to have the full pipe
configuration and state checks done before we touch the hw.

To ensure that all the little bits&pieces that are now moved to the
pipe_config handle this correctly, move its computation to the right
spot now, before we touch the hw in the disable_pipes step.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Paulo Zanoni Feb. 26, 2013, 5:11 p.m. UTC | #1
Hi

2013/2/21 Daniel Vetter <daniel.vetter@ffwll.ch>:
> To make decent modeset state checking possible (e.g. for the check
> mode with atomic modesetting) we want to have the full pipe
> configuration and state checks done before we touch the hw.
>
> To ensure that all the little bits&pieces that are now moved to the
> pipe_config handle this correctly, move its computation to the right
> spot now, before we touch the hw in the disable_pipes step.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 5a3e231..0f61008 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7806,12 +7806,6 @@ int intel_set_mode(struct drm_crtc *crtc,
>         intel_modeset_affected_pipes(crtc, &modeset_pipes,
>                                      &prepare_pipes, &disable_pipes);
>
> -       DRM_DEBUG_KMS("set mode pipe masks: modeset: %x, prepare: %x, disable: %x\n",
> -                     modeset_pipes, prepare_pipes, disable_pipes);
> -
> -       for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc)
> -               intel_crtc_disable(&intel_crtc->base);
> -
>         *saved_hwmode = crtc->hwmode;
>         *saved_mode = crtc->mode;
>
> @@ -7830,6 +7824,12 @@ int intel_set_mode(struct drm_crtc *crtc,
>                 }
>         }
>
> +       DRM_DEBUG_KMS("set mode pipe masks: modeset: %x, prepare: %x, disable: %x\n",
> +                     modeset_pipes, prepare_pipes, disable_pipes);
> +
> +       for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc)
> +               intel_crtc_disable(&intel_crtc->base);
> +
>         for_each_intel_crtc_masked(dev, prepare_pipes, intel_crtc) {
>                 if (intel_crtc->base.enabled)
>                         dev_priv->display.crtc_disable(&intel_crtc->base);
> --
> 1.7.11.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5a3e231..0f61008 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7806,12 +7806,6 @@  int intel_set_mode(struct drm_crtc *crtc,
 	intel_modeset_affected_pipes(crtc, &modeset_pipes,
 				     &prepare_pipes, &disable_pipes);
 
-	DRM_DEBUG_KMS("set mode pipe masks: modeset: %x, prepare: %x, disable: %x\n",
-		      modeset_pipes, prepare_pipes, disable_pipes);
-
-	for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc)
-		intel_crtc_disable(&intel_crtc->base);
-
 	*saved_hwmode = crtc->hwmode;
 	*saved_mode = crtc->mode;
 
@@ -7830,6 +7824,12 @@  int intel_set_mode(struct drm_crtc *crtc,
 		}
 	}
 
+	DRM_DEBUG_KMS("set mode pipe masks: modeset: %x, prepare: %x, disable: %x\n",
+		      modeset_pipes, prepare_pipes, disable_pipes);
+
+	for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc)
+		intel_crtc_disable(&intel_crtc->base);
+
 	for_each_intel_crtc_masked(dev, prepare_pipes, intel_crtc) {
 		if (intel_crtc->base.enabled)
 			dev_priv->display.crtc_disable(&intel_crtc->base);