diff options
author | Dave Airlie <airlied@redhat.com> | 2011-05-15 20:45:40 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-05-15 20:45:40 -0400 |
commit | 69f7876b2ab61e8114675d6092ad0b482e233612 (patch) | |
tree | a55aefd08d6c5f617d277a99e11b5a707e162585 /drivers/gpu/drm/drm_irq.c | |
parent | 0eacdba3a186e5d5b8a8bb421caacddc135e67e3 (diff) | |
parent | 645c62a5e95a5f9a8e0d0627446bbda4ee042024 (diff) |
Merge remote branch 'keithp/drm-intel-next' of /ssd/git/drm-next into drm-core-next
* 'keithp/drm-intel-next' of /ssd/git/drm-next: (301 commits)
drm/i915: split PCH clock gating init
drm/i915: add Ivybridge clock gating init function
drm/i915: Update the location of the ringbuffers' HWS_PGA registers for IVB.
drm/i915: Add support for fence registers on Ivybridge.
drm/i915: Use existing function instead of open-coding fence reg clear.
drm/i915: split clock gating init into per-chipset functions
drm/i915: set IBX pch type explicitly
drm/i915: add Ivy Bridge PCI IDs and driver feature structs
drm/i915: add PantherPoint PCH ID
agp/intel: add Ivy Bridge support
drm/i915: ring support for Ivy Bridge
drm/i915: page flip support for Ivy Bridge
drm/i915: interrupt & vblank support for Ivy Bridge
drm/i915: treat Ivy Bridge watermarks like Sandy Bridge
drm/i915: manual FDI training for Ivy Bridge
drm/i915: add swizzle/tiling support for Ivy Bridge
drm/i915: Ivy Bridge has split display and pipe control
drm/i915: add IS_IVYBRIDGE macro for checks
drm/i915: add IS_GEN7 macro to cover Ivy Bridge and later
drm/i915: split enable/disable vblank code into chipset specific functions
...
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 62ced7554ba..2022a5c966b 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -933,11 +933,34 @@ EXPORT_SYMBOL(drm_vblank_put); | |||
933 | 933 | ||
934 | void drm_vblank_off(struct drm_device *dev, int crtc) | 934 | void drm_vblank_off(struct drm_device *dev, int crtc) |
935 | { | 935 | { |
936 | struct drm_pending_vblank_event *e, *t; | ||
937 | struct timeval now; | ||
936 | unsigned long irqflags; | 938 | unsigned long irqflags; |
939 | unsigned int seq; | ||
937 | 940 | ||
938 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | 941 | spin_lock_irqsave(&dev->vbl_lock, irqflags); |
939 | vblank_disable_and_save(dev, crtc); | 942 | vblank_disable_and_save(dev, crtc); |
940 | DRM_WAKEUP(&dev->vbl_queue[crtc]); | 943 | DRM_WAKEUP(&dev->vbl_queue[crtc]); |
944 | |||
945 | /* Send any queued vblank events, lest the natives grow disquiet */ | ||
946 | seq = drm_vblank_count_and_time(dev, crtc, &now); | ||
947 | list_for_each_entry_safe(e, t, &dev->vblank_event_list, base.link) { | ||
948 | if (e->pipe != crtc) | ||
949 | continue; | ||
950 | DRM_DEBUG("Sending premature vblank event on disable: \ | ||
951 | wanted %d, current %d\n", | ||
952 | e->event.sequence, seq); | ||
953 | |||
954 | e->event.sequence = seq; | ||
955 | e->event.tv_sec = now.tv_sec; | ||
956 | e->event.tv_usec = now.tv_usec; | ||
957 | drm_vblank_put(dev, e->pipe); | ||
958 | list_move_tail(&e->base.link, &e->base.file_priv->event_list); | ||
959 | wake_up_interruptible(&e->base.file_priv->event_wait); | ||
960 | trace_drm_vblank_event_delivered(e->base.pid, e->pipe, | ||
961 | e->event.sequence); | ||
962 | } | ||
963 | |||
941 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | 964 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); |
942 | } | 965 | } |
943 | EXPORT_SYMBOL(drm_vblank_off); | 966 | EXPORT_SYMBOL(drm_vblank_off); |