All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/i915: call drm_handle_vblank before finish_page_flip
Date: Wed, 03 Oct 2012 11:08:40 +0300	[thread overview]
Message-ID: <1349251720.1026.0.camel@localhost> (raw)
In-Reply-To: <1349193276-13908-1-git-send-email-daniel.vetter@ffwll.ch>

On Tue, 2012-10-02 at 17:54 +0200, Daniel Vetter wrote:
> ... since finish_page_flip needs the vblank timestamp generated
> in drm_handle_vblank. Somehow all the gmch platforms get it right,
> but all the pch platform irq handlers get is wrong. Hooray for copy&
> pasting!
> 
> Currently this gets papered over by a gross hack in finish_page_flip.
> A second patch will remove that.
> 
> Note that without this, the new timestamp sanity checks in flip_test
> occasionally get tripped up, hence the cc: stable tag.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Tested-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_irq.c |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index d7f0066..1fc2489 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -698,12 +698,12 @@ static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS)
>  			intel_opregion_gse_intr(dev);
>  
>  		for (i = 0; i < 3; i++) {
> +			if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i)))
> +				drm_handle_vblank(dev, i);
>  			if (de_iir & (DE_PLANEA_FLIP_DONE_IVB << (5 * i))) {
>  				intel_prepare_page_flip(dev, i);
>  				intel_finish_page_flip_plane(dev, i);
>  			}
> -			if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i)))
> -				drm_handle_vblank(dev, i);
>  		}
>  
>  		/* check event from PCH */
> @@ -785,6 +785,12 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
>  	if (de_iir & DE_GSE)
>  		intel_opregion_gse_intr(dev);
>  
> +	if (de_iir & DE_PIPEA_VBLANK)
> +		drm_handle_vblank(dev, 0);
> +
> +	if (de_iir & DE_PIPEB_VBLANK)
> +		drm_handle_vblank(dev, 1);
> +
>  	if (de_iir & DE_PLANEA_FLIP_DONE) {
>  		intel_prepare_page_flip(dev, 0);
>  		intel_finish_page_flip_plane(dev, 0);
> @@ -795,12 +801,6 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
>  		intel_finish_page_flip_plane(dev, 1);
>  	}
>  
> -	if (de_iir & DE_PIPEA_VBLANK)
> -		drm_handle_vblank(dev, 0);
> -
> -	if (de_iir & DE_PIPEB_VBLANK)
> -		drm_handle_vblank(dev, 1);
> -
>  	/* check event from PCH */
>  	if (de_iir & DE_PCH_EVENT) {
>  		if (pch_iir & hotplug_mask)

  parent reply	other threads:[~2012-10-03  8:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 15:54 [PATCH 1/2] drm/i915: call drm_handle_vblank before finish_page_flip Daniel Vetter
2012-10-02 15:54 ` [PATCH 2/2] drm/i915: don't frob the vblank ts in finish_page_flip Daniel Vetter
2012-10-03  8:08 ` Imre Deak [this message]
2012-10-03  9:05   ` [PATCH 1/2] drm/i915: call drm_handle_vblank before finish_page_flip Chris Wilson
2012-10-03 11:50     ` Daniel Vetter

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=1349251720.1026.0.camel@localhost \
    --to=imre.deak@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.