diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2008-07-21 08:13:45 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2008-07-21 08:13:45 +0200 |
commit | 014935b680d12856a01c0b2fe6077a38d69d14d3 (patch) | |
tree | 6c6e33f2354f96fe04fc2c0ecc03a7e8e25a1dab | |
parent | 04893aa99abfbed8eb6d7067a974fa1f31193c87 (diff) |
Remove obsolete dev->vblank_suspend[crtc] tests.
Caused drm_update_vblank_count() not to do its thing when called from
drm_modeset_ctl() -> drm_vblank_get().
The vblank functionality no longer needs to be suspended during a modeset, so
rename the field to vblank_inmodeset.
-rw-r--r-- | linux-core/drmP.h | 2 | ||||
-rw-r--r-- | linux-core/drm_irq.c | 30 |
2 files changed, 11 insertions, 21 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 45a599b4..37dd60f9 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -851,7 +851,7 @@ struct drm_device { int *vblank_enabled; /* so we don't call enable more than once per disable */ u32 *vblank_premodeset; /* for compensation of spurious wraparounds */ - int *vblank_suspend; /* Don't wait while crtc is likely disabled */ + int *vblank_inmodeset; /* Display driver is setting mode */ struct timer_list vblank_disable_timer; u32 max_vblank_count; /**< size of vblank counter register */ diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c index 1f887d31..ec1e5be6 100644 --- a/linux-core/drm_irq.c +++ b/linux-core/drm_irq.c @@ -118,7 +118,7 @@ static void drm_vblank_cleanup(struct drm_device *dev) DRM_MEM_DRIVER); drm_free(dev->vblank_premodeset, sizeof(*dev->vblank_premodeset) * dev->num_crtcs, DRM_MEM_DRIVER); - drm_free(dev->vblank_suspend, sizeof(*dev->vblank_suspend) * + drm_free(dev->vblank_inmodeset, sizeof(*dev->vblank_inmodeset) * dev->num_crtcs, DRM_MEM_DRIVER); dev->num_crtcs = 0; @@ -168,9 +168,9 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs) if (!dev->vblank_premodeset) goto err; - dev->vblank_suspend = drm_calloc(num_crtcs, sizeof(int), + dev->vblank_inmodeset = drm_calloc(num_crtcs, sizeof(int), DRM_MEM_DRIVER); - if (!dev->vblank_suspend) + if (!dev->vblank_inmodeset) goto err; /* Zero per-crtc vblank stuff */ @@ -363,9 +363,6 @@ void drm_update_vblank_count(struct drm_device *dev, int crtc) { u32 cur_vblank, diff; - if (dev->vblank_suspend[crtc]) - return; - /* * Interrupts were disabled prior to this call, so deal with counter * wrap if needed. @@ -483,18 +480,18 @@ int drm_modeset_ctl(struct drm_device *dev, void *data, */ switch (modeset->cmd) { case _DRM_PRE_MODESET: - if (!dev->vblank_suspend[crtc]) { + if (!dev->vblank_inmodeset[crtc]) { spin_lock_irqsave(&dev->vbl_lock, irqflags); - dev->vblank_suspend[crtc] = 1; + dev->vblank_inmodeset[crtc] = 1; spin_unlock_irqrestore(&dev->vbl_lock, irqflags); drm_vblank_get(dev, crtc); } break; case _DRM_POST_MODESET: - if (dev->vblank_suspend[crtc]) { + if (dev->vblank_inmodeset[crtc]) { spin_lock_irqsave(&dev->vbl_lock, irqflags); dev->vblank_disable_allowed = 1; - dev->vblank_suspend[crtc] = 0; + dev->vblank_inmodeset[crtc] = 0; spin_unlock_irqrestore(&dev->vbl_lock, irqflags); drm_vblank_put(dev, crtc); } @@ -577,11 +574,6 @@ int drm_wait_vblank(struct drm_device *dev, void *data, struct list_head *vbl_sigs = &dev->vbl_sigs[crtc]; struct drm_vbl_sig *vbl_sig; - if (dev->vblank_suspend[crtc]) { - ret = -EBUSY; - goto done; - } - spin_lock_irqsave(&dev->vbl_lock, irqflags); /* Check if this task has already scheduled the same signal @@ -636,11 +628,9 @@ int drm_wait_vblank(struct drm_device *dev, void *data, vblwait->reply.sequence = seq; } else { - if (!dev->vblank_suspend[crtc]) { - DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ, - ((drm_vblank_count(dev, crtc) - - vblwait->request.sequence) <= (1 << 23))); - } + DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ, + ((drm_vblank_count(dev, crtc) + - vblwait->request.sequence) <= (1 << 23))); if (ret != -EINTR) { struct timeval now; |