diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:15:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:15:30 -0400 |
commit | 43813f399c72aa22e01a680559c1cb5274bf2140 (patch) | |
tree | 933c0e7c445b9c3478b5a0db06a162d0d39f00f2 /drivers/gpu/drm/drm_irq.c | |
parent | a552f0af753eb4b5bbbe9eff205fe874b04c4583 (diff) | |
parent | 0b7af262aba912f52bc6ef76f1bc0960b01b8502 (diff) |
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (24 commits)
agp/intel: Make intel_i965_mask_memory use dma_addr_t for physical addresses
agp: add user mapping support to ATI AGP bridge.
drm/i915: enable GEM on PAE.
drm/radeon: fix unused variables warning
agp: switch AGP to use page array instead of unsigned long array
agpgart: detected ALi M???? chipset with M1621
drm/radeon: command stream checker for r3xx-r5xx hardware
drm/radeon: Fully initialize LVDS info also when we can't get it from the ROM.
radeon: Fix CP byte order on big endian architectures with KMS.
agp/uninorth: Handle user memory types.
drm/ttm: Add some powerpc cache flush code.
radeon: Enable modesetting on non-x86.
drm/radeon: Respect AGP cant_use_aperture flag.
drm: EDID endianness fixes.
drm/radeon: this VRAM vs aperture test is wrong, just remove it.
drm/ttm: fix an error path to exit function correctly
drm: Apply "Memory fragmentation from lost alignment blocks"
ttm: Return -ERESTART when a signal interrupts bo eviction.
drm: Remove memory debugging infrastructure.
drm/i915: Clear fence register on tiling stride change.
...
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index fc8e5acd9d9..b4a3dbcebe9 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -104,21 +104,13 @@ void drm_vblank_cleanup(struct drm_device *dev) | |||
104 | 104 | ||
105 | vblank_disable_fn((unsigned long)dev); | 105 | vblank_disable_fn((unsigned long)dev); |
106 | 106 | ||
107 | drm_free(dev->vbl_queue, sizeof(*dev->vbl_queue) * dev->num_crtcs, | 107 | kfree(dev->vbl_queue); |
108 | DRM_MEM_DRIVER); | 108 | kfree(dev->_vblank_count); |
109 | drm_free(dev->_vblank_count, sizeof(*dev->_vblank_count) * | 109 | kfree(dev->vblank_refcount); |
110 | dev->num_crtcs, DRM_MEM_DRIVER); | 110 | kfree(dev->vblank_enabled); |
111 | drm_free(dev->vblank_refcount, sizeof(*dev->vblank_refcount) * | 111 | kfree(dev->last_vblank); |
112 | dev->num_crtcs, DRM_MEM_DRIVER); | 112 | kfree(dev->last_vblank_wait); |
113 | drm_free(dev->vblank_enabled, sizeof(*dev->vblank_enabled) * | 113 | kfree(dev->vblank_inmodeset); |
114 | dev->num_crtcs, DRM_MEM_DRIVER); | ||
115 | drm_free(dev->last_vblank, sizeof(*dev->last_vblank) * dev->num_crtcs, | ||
116 | DRM_MEM_DRIVER); | ||
117 | drm_free(dev->last_vblank_wait, | ||
118 | sizeof(*dev->last_vblank_wait) * dev->num_crtcs, | ||
119 | DRM_MEM_DRIVER); | ||
120 | drm_free(dev->vblank_inmodeset, sizeof(*dev->vblank_inmodeset) * | ||
121 | dev->num_crtcs, DRM_MEM_DRIVER); | ||
122 | 114 | ||
123 | dev->num_crtcs = 0; | 115 | dev->num_crtcs = 0; |
124 | } | 116 | } |
@@ -132,37 +124,33 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs) | |||
132 | spin_lock_init(&dev->vbl_lock); | 124 | spin_lock_init(&dev->vbl_lock); |
133 | dev->num_crtcs = num_crtcs; | 125 | dev->num_crtcs = num_crtcs; |
134 | 126 | ||
135 | dev->vbl_queue = drm_alloc(sizeof(wait_queue_head_t) * num_crtcs, | 127 | dev->vbl_queue = kmalloc(sizeof(wait_queue_head_t) * num_crtcs, |
136 | DRM_MEM_DRIVER); | 128 | GFP_KERNEL); |
137 | if (!dev->vbl_queue) | 129 | if (!dev->vbl_queue) |
138 | goto err; | 130 | goto err; |
139 | 131 | ||
140 | dev->_vblank_count = drm_alloc(sizeof(atomic_t) * num_crtcs, | 132 | dev->_vblank_count = kmalloc(sizeof(atomic_t) * num_crtcs, GFP_KERNEL); |
141 | DRM_MEM_DRIVER); | ||
142 | if (!dev->_vblank_count) | 133 | if (!dev->_vblank_count) |
143 | goto err; | 134 | goto err; |
144 | 135 | ||
145 | dev->vblank_refcount = drm_alloc(sizeof(atomic_t) * num_crtcs, | 136 | dev->vblank_refcount = kmalloc(sizeof(atomic_t) * num_crtcs, |
146 | DRM_MEM_DRIVER); | 137 | GFP_KERNEL); |
147 | if (!dev->vblank_refcount) | 138 | if (!dev->vblank_refcount) |
148 | goto err; | 139 | goto err; |
149 | 140 | ||
150 | dev->vblank_enabled = drm_calloc(num_crtcs, sizeof(int), | 141 | dev->vblank_enabled = kcalloc(num_crtcs, sizeof(int), GFP_KERNEL); |
151 | DRM_MEM_DRIVER); | ||
152 | if (!dev->vblank_enabled) | 142 | if (!dev->vblank_enabled) |
153 | goto err; | 143 | goto err; |
154 | 144 | ||
155 | dev->last_vblank = drm_calloc(num_crtcs, sizeof(u32), DRM_MEM_DRIVER); | 145 | dev->last_vblank = kcalloc(num_crtcs, sizeof(u32), GFP_KERNEL); |
156 | if (!dev->last_vblank) | 146 | if (!dev->last_vblank) |
157 | goto err; | 147 | goto err; |
158 | 148 | ||
159 | dev->last_vblank_wait = drm_calloc(num_crtcs, sizeof(u32), | 149 | dev->last_vblank_wait = kcalloc(num_crtcs, sizeof(u32), GFP_KERNEL); |
160 | DRM_MEM_DRIVER); | ||
161 | if (!dev->last_vblank_wait) | 150 | if (!dev->last_vblank_wait) |
162 | goto err; | 151 | goto err; |
163 | 152 | ||
164 | dev->vblank_inmodeset = drm_calloc(num_crtcs, sizeof(int), | 153 | dev->vblank_inmodeset = kcalloc(num_crtcs, sizeof(int), GFP_KERNEL); |
165 | DRM_MEM_DRIVER); | ||
166 | if (!dev->vblank_inmodeset) | 154 | if (!dev->vblank_inmodeset) |
167 | goto err; | 155 | goto err; |
168 | 156 | ||