From: Matthew Garrett <mjg@redhat.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, Matthew Garrett <mjg@redhat.com>
Subject: [RFC 2/3] drm: Handle the vblank_offdelay=0 case properly
Date: Wed, 16 Nov 2011 09:20:52 -0500 [thread overview]
Message-ID: <1321453253-20183-3-git-send-email-mjg@redhat.com> (raw)
In-Reply-To: <1321453253-20183-1-git-send-email-mjg@redhat.com>
Right now if vblank_offdelay is 0, vblanks won't be disabled after the
last user. Fix that case up.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
drivers/gpu/drm/drm_irq.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 8bcb6a4..94f9579 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -935,8 +935,7 @@ void drm_vblank_put(struct drm_device *dev, int crtc)
BUG_ON(atomic_read(&dev->vblank_refcount[crtc]) == 0);
/* Last user schedules interrupt disable */
- if (atomic_dec_and_test(&dev->vblank_refcount[crtc]) &&
- (dev->vblank_offdelay > 0))
+ if (atomic_dec_and_test(&dev->vblank_refcount[crtc]))
mod_timer(&dev->vblank_disable_timer,
jiffies + ((dev->vblank_offdelay * DRM_HZ)/1000));
}
--
1.7.7.1
next prev parent reply other threads:[~2011-11-16 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 14:20 [RFC] Reduce idle vblank wakeups Matthew Garrett
2011-11-16 14:20 ` [RFC 1/3] drm: Make drm_vblank_offdelay per-device Matthew Garrett
2011-11-16 14:20 ` Matthew Garrett [this message]
2011-11-16 14:20 ` [RFC 3/3] i915: Drop vblank_offdelay Matthew Garrett
2011-11-16 14:32 ` [RFC] Reduce idle vblank wakeups Adam Jackson
2011-11-16 17:03 ` Michel Dänzer
2011-11-16 17:11 ` Matthew Garrett
2011-11-16 17:53 ` [Intel-gfx] " Andrew Lutomirski
2011-11-16 18:27 ` Mario Kleiner
2011-11-16 18:48 ` Matthew Garrett
2011-11-17 0:26 ` Mario Kleiner
2011-11-17 2:19 ` Matthew Garrett
2011-11-17 5:36 ` [Intel-gfx] " Andrew Lutomirski
2011-11-17 5:39 ` [RFC PATCH] drm: Fix off-by-one races on vblank disable Andy Lutomirski
2012-05-04 18:31 ` [Intel-gfx] [RFC] Reduce idle vblank wakeups Matthew Garrett
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=1321453253-20183-3-git-send-email-mjg@redhat.com \
--to=mjg@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox