public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Sitsofe Wheeler <sitsofe@yahoo.com>
Cc: intel-gfx@lists.freedesktop.org,
	Chris Wilson <chris@chris-wilson.co.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Revert extra intel_wait_for_vblank to prevent stalls.
Date: Tue, 24 Aug 2010 09:35:03 -0700	[thread overview]
Message-ID: <20100824093503.471bcf4e@virtuousgeek.org> (raw)
In-Reply-To: <20100824155616.GC10473@sucs.org>

On Tue, 24 Aug 2010 16:56:16 +0100
Sitsofe Wheeler <sitsofe@yahoo.com> wrote:

> With the extra intel_wait_for_vblank added in commit
> 9d0498a2bf7455159b317f19531a3e5db2ecc9c4 periodic stalls were being
> triggered (which were detected by i915_hangcheck_elapsed). Partially
> revert this change for now.
> 
> Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 116d938..534f1fa 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2379,8 +2379,10 @@ static void i9xx_crtc_dpms(struct drm_crtc *crtc, int mode)
>  			I915_READ(dspbase_reg);
>  		}
>  
> -		/* Wait for vblank for the disable to take effect */
> -		intel_wait_for_vblank_off(dev, pipe);
> +		if (!IS_I9XX(dev)) {
> +			/* Wait for vblank for the disable to take effect */
> +			intel_wait_for_vblank_off(dev, pipe);
> +		}
>  
>  		/* Don't disable pipe A or pipe A PLLs if needed */
>  		if (pipeconf_reg == PIPEACONF &&

Hm why would we be triggering the hangcheck timer due to this code?
I'd rather figure that out and fix it before covering it up like this.

Wait for vblank off will spin until the display line reg stops
incrementing, so it's important that we flush any previous writes to
shut off the pipe before waiting.  So adding a POSTING_READ() above it
might help?  But that still doesn't explain why it would cause the
hangcheck timer to notice a hang...

-- 
Jesse Barnes, Intel Open Source Technology Center

  reply	other threads:[~2010-08-24 16:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 23:35 [REGRESSION, i915]: Periodic stalls with 2.6.36-rc2 Sitsofe Wheeler
2010-08-24  0:12 ` Chris Wilson
2010-08-24  7:57   ` Sitsofe Wheeler
2010-08-24  8:16     ` Chris Wilson
2010-08-24  8:49       ` Sitsofe Wheeler
2010-08-24  9:00         ` Chris Wilson
2010-08-24  9:55           ` [REGRESSION, BISECTED, " Sitsofe Wheeler
2010-08-24 15:41             ` [PATCH 1/2] drm/i915: Revert wait for vblank to prevent X refresh issues Sitsofe Wheeler
2010-08-24 15:53             ` Sitsofe Wheeler
2010-08-24 15:56               ` [PATCH 2/2] drm/i915: Revert extra intel_wait_for_vblank to prevent stalls Sitsofe Wheeler
2010-08-24 16:35                 ` Jesse Barnes [this message]
2010-08-24 16:39               ` [PATCH 1/2] drm/i915: Revert wait for vblank to prevent X refresh issues Jesse Barnes

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=20100824093503.471bcf4e@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sitsofe@yahoo.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