diff options
author | Dave Airlie <airlied@redhat.com> | 2010-12-21 18:48:54 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-12-21 18:48:54 -0500 |
commit | ae09f09e94d755ed45c58b695675636c0ec53f9e (patch) | |
tree | 77cb9bac7d81f5b1250b8638a007e10c17b600af /drivers/gpu/drm/drm_irq.c | |
parent | 1d99e5c57255d188773fb437391df24fe8faf575 (diff) | |
parent | 5909a77ac62cc042f94bd262016cf468a2f96022 (diff) |
Merge remote branch 'intel/drm-intel-next' of /ssd/git/drm-next into drm-core-next
* 'intel/drm-intel-next' of /ssd/git/drm-next: (771 commits)
drm/i915: Undo "Uncouple render/power ctx before suspending"
drm/i915: Allow the application to choose the constant addressing mode
drm/i915: dynamic render p-state support for Sandy Bridge
drm/i915: Enable EI mode for RCx decision making on Sandybridge
drm/i915/sdvo: Border and stall select became test bits in gen5
drm/i915: Add Guess-o-matic for pageflip timestamping.
drm/i915: Add support for precise vblank timestamping (v2)
drm/i915: Add frame buffer compression on Sandybridge
drm/i915: Add self-refresh support on Sandybridge
drm/i915: Wait for vblank before unpinning old fb
Revert "drm/i915: Avoid using PIPE_CONTROL on Ironlake"
drm/i915: Pass clock limits down to PLL matcher
drm/i915: Poll for seqno completion if IRQ is disabled
drm/i915/ringbuffer: Make IRQ refcnting atomic
agp/intel: Fix missed cached memory flags setting in i965_write_entry()
drm/i915/sdvo: Only use the SDVO pin if it is in the valid range
drm/i915: Enable RC6 autodownclocking on Sandybridge
drm/i915: Terminate the FORCE WAKE after we have finished reading
drm/i915/gtt: Clear the cachelines upon resume
drm/i915: Restore GTT mapping first upon resume
...
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 55160d7c38b6..8304c42195fc 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -1047,10 +1047,13 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe, | |||
1047 | struct timeval now; | 1047 | struct timeval now; |
1048 | unsigned long flags; | 1048 | unsigned long flags; |
1049 | unsigned int seq; | 1049 | unsigned int seq; |
1050 | int ret; | ||
1050 | 1051 | ||
1051 | e = kzalloc(sizeof *e, GFP_KERNEL); | 1052 | e = kzalloc(sizeof *e, GFP_KERNEL); |
1052 | if (e == NULL) | 1053 | if (e == NULL) { |
1053 | return -ENOMEM; | 1054 | ret = -ENOMEM; |
1055 | goto err_put; | ||
1056 | } | ||
1054 | 1057 | ||
1055 | e->pipe = pipe; | 1058 | e->pipe = pipe; |
1056 | e->base.pid = current->pid; | 1059 | e->base.pid = current->pid; |
@@ -1064,9 +1067,8 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe, | |||
1064 | spin_lock_irqsave(&dev->event_lock, flags); | 1067 | spin_lock_irqsave(&dev->event_lock, flags); |
1065 | 1068 | ||
1066 | if (file_priv->event_space < sizeof e->event) { | 1069 | if (file_priv->event_space < sizeof e->event) { |
1067 | spin_unlock_irqrestore(&dev->event_lock, flags); | 1070 | ret = -EBUSY; |
1068 | kfree(e); | 1071 | goto err_unlock; |
1069 | return -ENOMEM; | ||
1070 | } | 1072 | } |
1071 | 1073 | ||
1072 | file_priv->event_space -= sizeof e->event; | 1074 | file_priv->event_space -= sizeof e->event; |
@@ -1103,6 +1105,13 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe, | |||
1103 | spin_unlock_irqrestore(&dev->event_lock, flags); | 1105 | spin_unlock_irqrestore(&dev->event_lock, flags); |
1104 | 1106 | ||
1105 | return 0; | 1107 | return 0; |
1108 | |||
1109 | err_unlock: | ||
1110 | spin_unlock_irqrestore(&dev->event_lock, flags); | ||
1111 | kfree(e); | ||
1112 | err_put: | ||
1113 | drm_vblank_put(dev, e->pipe); | ||
1114 | return ret; | ||
1106 | } | 1115 | } |
1107 | 1116 | ||
1108 | /** | 1117 | /** |