From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/5] drm: Use correct spinlock flavor in drm_vblank_get()
Date: Wed, 26 Feb 2014 11:24:44 -0800 [thread overview]
Message-ID: <20140226112444.3fe1471b@jbarnes-desktop> (raw)
In-Reply-To: <1393009415-27651-2-git-send-email-ville.syrjala@linux.intel.com>
On Fri, 21 Feb 2014 21:03:31 +0200
ville.syrjala@linux.intel.com wrote:
> From: Peter Hurley <peter@hurleysoftware.com>
>
> The irq flags state is already established by the outer
> spin_lock_irqsave(); re-disabling irqs is redundant.
>
> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> ---
> drivers/gpu/drm/drm_irq.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index c2676b5..baa12e7 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -882,13 +882,13 @@ static void drm_update_vblank_count(struct drm_device *dev, int crtc)
> */
> int drm_vblank_get(struct drm_device *dev, int crtc)
> {
> - unsigned long irqflags, irqflags2;
> + unsigned long irqflags;
> int ret = 0;
>
> spin_lock_irqsave(&dev->vbl_lock, irqflags);
> /* Going from 0->1 means we have to enable interrupts again */
> if (atomic_add_return(1, &dev->vblank[crtc].refcount) == 1) {
> - spin_lock_irqsave(&dev->vblank_time_lock, irqflags2);
> + spin_lock(&dev->vblank_time_lock);
> if (!dev->vblank[crtc].enabled) {
> /* Enable vblank irqs under vblank_time_lock protection.
> * All vblank count & timestamp updates are held off
> @@ -906,7 +906,7 @@ int drm_vblank_get(struct drm_device *dev, int crtc)
> drm_update_vblank_count(dev, crtc);
> }
> }
> - spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags2);
> + spin_unlock(&dev->vblank_time_lock);
> } else {
> if (!dev->vblank[crtc].enabled) {
> atomic_dec(&dev->vblank[crtc].refcount);
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-02-26 19:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 19:03 [PATCH 0/5] drm: Allow vblank interrupts during modeset and make the code less racy ville.syrjala
2014-02-21 19:03 ` [PATCH 1/5] drm: Use correct spinlock flavor in drm_vblank_get() ville.syrjala
2014-02-26 19:24 ` Jesse Barnes [this message]
2014-02-21 19:03 ` [PATCH 2/5] drm: Make the vblank disable timer per-crtc ville.syrjala
2014-02-26 19:32 ` Jesse Barnes
2014-02-21 19:03 ` [PATCH 3/5] drm: Allow the driver to reject vblank requests only when it really has the vblank interrupts disabled ville.syrjala
2014-02-26 19:41 ` Jesse Barnes
2014-03-04 9:24 ` Daniel Vetter
2014-03-05 12:38 ` Ville Syrjälä
2014-03-05 13:55 ` Daniel Vetter
2014-02-21 19:03 ` [PATCH 4/5] drm: Allow reenabling of vblank interrupts even if refcount>0 ville.syrjala
2014-02-26 19:44 ` Jesse Barnes
2014-03-04 9:16 ` Daniel Vetter
2014-03-05 12:33 ` Ville Syrjälä
2014-02-21 19:03 ` [PATCH 5/5] drm/i915: Allow vblank interrupts during modeset and eliminate some vblank races ville.syrjala
2014-02-24 3:48 ` Michel Dänzer
2014-02-24 12:11 ` Ville Syrjälä
2014-02-25 2:58 ` Michel Dänzer
2014-02-26 19:48 ` Jesse Barnes
2014-03-04 9:13 ` Daniel Vetter
2014-05-28 9:12 ` Michel Dänzer
2014-05-28 11:19 ` [Intel-gfx] " Ville Syrjälä
2014-05-29 4:11 ` Michel Dänzer
2014-05-29 10:56 ` Daniel Vetter
2014-05-30 3:13 ` Michel Dänzer
2014-02-28 8:56 ` Ville Syrjälä
2014-03-04 9:15 ` 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=20140226112444.3fe1471b@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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