diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-10 06:44:43 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-10 06:44:43 -0400 |
commit | 967ad7f1489da7babbe0746f81c283458ecd3f84 (patch) | |
tree | 812608fd6efcfe81096bd51b1ec1c2a4167385f6 /drivers/gpu/drm/drm_drv.c | |
parent | d7bf63f2465b3b6335dd66ffbf387768d81a59d5 (diff) | |
parent | 6aba5b6cf098ba305fc31b23cc14114a16768d22 (diff) |
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next
The conflict in intel_drv.h tripped me up a bit since a patch in dinq
moves all the functions around, but another one in drm-next removes a
single function. So I'ev figured backing this into a backmerge would
be good.
i915_dma.c is just adjacent lines changed, nothing nefarious there.
Conflicts:
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_drv.h
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index e79d8d9ca203..b55f138bd990 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -171,76 +171,6 @@ static const struct drm_ioctl_desc drm_ioctls[] = { | |||
171 | 171 | ||
172 | #define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) | 172 | #define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) |
173 | 173 | ||
174 | /** | ||
175 | * drm_legacy_dev_reinit | ||
176 | * | ||
177 | * Reinitializes a legacy/ums drm device in it's lastclose function. | ||
178 | */ | ||
179 | static void drm_legacy_dev_reinit(struct drm_device *dev) | ||
180 | { | ||
181 | int i; | ||
182 | |||
183 | if (drm_core_check_feature(dev, DRIVER_MODESET)) | ||
184 | return; | ||
185 | |||
186 | atomic_set(&dev->ioctl_count, 0); | ||
187 | atomic_set(&dev->vma_count, 0); | ||
188 | |||
189 | for (i = 0; i < ARRAY_SIZE(dev->counts); i++) | ||
190 | atomic_set(&dev->counts[i], 0); | ||
191 | |||
192 | dev->sigdata.lock = NULL; | ||
193 | |||
194 | dev->context_flag = 0; | ||
195 | dev->last_context = 0; | ||
196 | dev->if_version = 0; | ||
197 | } | ||
198 | |||
199 | /** | ||
200 | * Take down the DRM device. | ||
201 | * | ||
202 | * \param dev DRM device structure. | ||
203 | * | ||
204 | * Frees every resource in \p dev. | ||
205 | * | ||
206 | * \sa drm_device | ||
207 | */ | ||
208 | int drm_lastclose(struct drm_device * dev) | ||
209 | { | ||
210 | struct drm_vma_entry *vma, *vma_temp; | ||
211 | |||
212 | DRM_DEBUG("\n"); | ||
213 | |||
214 | if (dev->driver->lastclose) | ||
215 | dev->driver->lastclose(dev); | ||
216 | DRM_DEBUG("driver lastclose completed\n"); | ||
217 | |||
218 | if (dev->irq_enabled && !drm_core_check_feature(dev, DRIVER_MODESET)) | ||
219 | drm_irq_uninstall(dev); | ||
220 | |||
221 | mutex_lock(&dev->struct_mutex); | ||
222 | |||
223 | drm_agp_clear(dev); | ||
224 | |||
225 | drm_legacy_sg_cleanup(dev); | ||
226 | |||
227 | /* Clear vma list (only built for debugging) */ | ||
228 | list_for_each_entry_safe(vma, vma_temp, &dev->vmalist, head) { | ||
229 | list_del(&vma->head); | ||
230 | kfree(vma); | ||
231 | } | ||
232 | |||
233 | drm_legacy_dma_takedown(dev); | ||
234 | |||
235 | dev->dev_mapping = NULL; | ||
236 | mutex_unlock(&dev->struct_mutex); | ||
237 | |||
238 | drm_legacy_dev_reinit(dev); | ||
239 | |||
240 | DRM_DEBUG("lastclose completed\n"); | ||
241 | return 0; | ||
242 | } | ||
243 | |||
244 | /** File operations structure */ | 174 | /** File operations structure */ |
245 | static const struct file_operations drm_stub_fops = { | 175 | static const struct file_operations drm_stub_fops = { |
246 | .owner = THIS_MODULE, | 176 | .owner = THIS_MODULE, |
@@ -386,7 +316,6 @@ long drm_ioctl(struct file *filp, | |||
386 | return -ENODEV; | 316 | return -ENODEV; |
387 | 317 | ||
388 | atomic_inc(&dev->ioctl_count); | 318 | atomic_inc(&dev->ioctl_count); |
389 | atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]); | ||
390 | ++file_priv->ioctl_count; | 319 | ++file_priv->ioctl_count; |
391 | 320 | ||
392 | if ((nr >= DRM_CORE_IOCTL_COUNT) && | 321 | if ((nr >= DRM_CORE_IOCTL_COUNT) && |