dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Dennis <dennis.nezic@utoronto.ca>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/3] drm/i915: Restore vblank interrupts earlier
Date: Tue, 2 Oct 2018 10:48:36 +0200	[thread overview]
Message-ID: <20181002084836.GM11082@phenom.ffwll.local> (raw)
In-Reply-To: <20181001142909.5567-1-ville.syrjala@linux.intel.com>

On Mon, Oct 01, 2018 at 05:29:07PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Plane sanitation needs vblank interrupts (on account of CxSR disable).
> So let's restore vblank interrupts earlier.
> 
> v2: Make it actually build
> 
> Cc: stable@vger.kernel.org
> Cc: Dennis <dennis.nezic@utoronto.ca>
> Tested-by: Dennis <dennis.nezic@utoronto.ca>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105637
> Fixes: b1e01595a66d ("drm/i915: Redo plane sanitation during readout")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4c5c2b39e65c..e018b37bed39 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15551,13 +15551,9 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
>  			   I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);
>  	}
>  
> -	/* restore vblank interrupts to correct state */
> -	drm_crtc_vblank_reset(&crtc->base);
>  	if (crtc->active) {
>  		struct intel_plane *plane;
>  
> -		drm_crtc_vblank_on(&crtc->base);
> -
>  		/* Disable everything but the primary plane */
>  		for_each_intel_plane_on_crtc(dev, crtc, plane) {
>  			const struct intel_plane_state *plane_state =
> @@ -15899,7 +15895,6 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  			     struct drm_modeset_acquire_ctx *ctx)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	enum pipe pipe;
>  	struct intel_crtc *crtc;
>  	struct intel_encoder *encoder;
>  	int i;
> @@ -15912,15 +15907,19 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  	/* HW state is read out, now we need to sanitize this mess. */
>  	get_encoder_power_domains(dev_priv);
>  
> -	intel_sanitize_plane_mapping(dev_priv);

If you add a comment here why we need to do this, this has my

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> +	for_each_intel_crtc(&dev_priv->drm, crtc) {
> +		drm_crtc_vblank_reset(&crtc->base);
>  
> -	for_each_intel_encoder(dev, encoder) {
> -		intel_sanitize_encoder(encoder);
> +		if (crtc->active)
> +			drm_crtc_vblank_on(&crtc->base);
>  	}
>  
> -	for_each_pipe(dev_priv, pipe) {
> -		crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
> +	intel_sanitize_plane_mapping(dev_priv);
>  
> +	for_each_intel_encoder(dev, encoder)
> +		intel_sanitize_encoder(encoder);
> +
> +	for_each_intel_crtc(&dev_priv->drm, crtc) {
>  		intel_sanitize_crtc(crtc, ctx);
>  		intel_dump_pipe_config(crtc, crtc->config,
>  				       "[setup_hw_state]");
> -- 
> 2.16.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  parent reply	other threads:[~2018-10-02  8:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 14:29 [PATCH 1/3] drm/i915: Restore vblank interrupts earlier Ville Syrjala
2018-10-01 14:31 ` [PATCH 2/3] drm/i915: Use the correct crtc when sanitizing plane mapping Ville Syrjala
2018-10-02 12:11   ` [Intel-gfx] " Daniel Vetter
2018-10-02 14:21     ` Ville Syrjälä
2018-10-03  8:53       ` [Intel-gfx] " Daniel Vetter
2018-10-03 14:32         ` Ville Syrjälä
2018-10-03 14:50   ` [PATCH v2 " Ville Syrjala
2018-10-03 16:12     ` Daniel Vetter
2018-10-04 17:24       ` Ville Syrjälä
2018-10-01 14:31 ` [PATCH 3/3] drm/i915: Clean up early plane debugs Ville Syrjala
2018-10-02 12:21   ` Daniel Vetter
2018-10-02 14:42     ` [Intel-gfx] " Ville Syrjälä
2018-10-03 14:50   ` [PATCH v2 " Ville Syrjala
2018-10-03 16:12     ` [Intel-gfx] " Daniel Vetter
2018-10-02  8:48 ` Daniel Vetter [this message]
2018-10-03 14:49 ` [PATCH v2 1/3] drm/i915: Restore vblank interrupts earlier Ville Syrjala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181002084836.GM11082@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dennis.nezic@utoronto.ca \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox