All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/4] drm: Really never disable vblank irqs for offdelay==0
Date: Wed, 10 Sep 2014 15:24:19 -0700	[thread overview]
Message-ID: <20140910222419.GJ26681@intel.com> (raw)
In-Reply-To: <1410363371-11282-1-git-send-email-daniel.vetter@ffwll.ch>

On Wed, Sep 10, 2014 at 05:36:08PM +0200, Daniel Vetter wrote:
> With the new support for immediate vblank disabling we always disabled
> the vblank interrupt right away, irrespective of the vblank offdelay
> setting.
> 
> But being able to let vblanks run forever is fairly useful for
> debugging, so restore that behaviour.
> 
> Suggested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
> Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/drm_irq.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index a75da075927c..6eb015020af2 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -1024,9 +1024,11 @@ void drm_vblank_put(struct drm_device *dev, int crtc)
>  
>  	/* Last user schedules interrupt disable */
>  	if (atomic_dec_and_test(&vblank->refcount)) {
> -		if (dev->vblank_disable_immediate || drm_vblank_offdelay < 0)
> +		if (drm_vblank_offdelay == 0)
> +			return;
> +		else if (dev->vblank_disable_immediate || drm_vblank_offdelay < 0)
>  			vblank_disable_fn((unsigned long)vblank);
> -		else if (drm_vblank_offdelay > 0)
> +		else
>  			mod_timer(&vblank->disable_timer,
>  				  jiffies + ((drm_vblank_offdelay * HZ)/1000));
>  	}
> -- 
> 1.9.3
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795

      parent reply	other threads:[~2014-09-10 22:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 15:36 [PATCH 1/4] drm: Really never disable vblank irqs for offdelay==0 Daniel Vetter
2014-09-10 15:36 ` [PATCH 2/4] drm: Only update final vblank count when precise ts is available Daniel Vetter
2014-09-11 14:09   ` Matt Roper
2014-09-10 15:36 ` [PATCH 3/4] drm: Simplify return value of drm_get_last_vbltimestamp Daniel Vetter
2014-09-11 11:28   ` Mario Kleiner
2014-09-11 11:30     ` Daniel Vetter
2014-09-10 15:36 ` [PATCH 4/4] drm: Clarify vblank ts/scanoutpos sampling #defines Daniel Vetter
2014-09-10 22:24 ` Matt Roper [this message]

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=20140910222419.GJ26681@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.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.