The initial mode setting from the 2D driver is done before drm_vblank_init
is called, which means that vblank_disable_allow isn't set. This prevents
the kernel from disabling vblank interrupts after they are first turned on.

Signed-off-by: Keith Packard <[EMAIL PROTECTED]>
---
 drivers/gpu/drm/drm_irq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 212a94f..61c2a46 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -448,6 +448,8 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
        unsigned long irqflags;
        int crtc, ret = 0;
 
+       dev->vblank_disable_allowed = 1;
+
        /* If drm_vblank_init() hasn't been called yet, just no-op */
        if (!dev->num_crtcs)
                goto out;
@@ -475,7 +477,6 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
        case _DRM_POST_MODESET:
                if (dev->vblank_inmodeset[crtc]) {
                        spin_lock_irqsave(&dev->vbl_lock, irqflags);
-                       dev->vblank_disable_allowed = 1;
                        dev->vblank_inmodeset[crtc] = 0;
                        spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
                        drm_vblank_put(dev, crtc);
-- 
1.5.6.5


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to