diff options
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_info.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_vm.c | 3 | ||||
-rw-r--r-- | include/drm/drmP.h | 1 |
4 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 330f3dd8e9d0..7f2af9aca038 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -391,8 +391,6 @@ static void drm_legacy_dev_reinit(struct drm_device *dev) | |||
391 | if (drm_core_check_feature(dev, DRIVER_MODESET)) | 391 | if (drm_core_check_feature(dev, DRIVER_MODESET)) |
392 | return; | 392 | return; |
393 | 393 | ||
394 | atomic_set(&dev->vma_count, 0); | ||
395 | |||
396 | dev->sigdata.lock = NULL; | 394 | dev->sigdata.lock = NULL; |
397 | 395 | ||
398 | dev->context_flag = 0; | 396 | dev->context_flag = 0; |
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index 31da45c582fc..7473035dd28b 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c | |||
@@ -234,14 +234,18 @@ int drm_vma_info(struct seq_file *m, void *data) | |||
234 | struct drm_device *dev = node->minor->dev; | 234 | struct drm_device *dev = node->minor->dev; |
235 | struct drm_vma_entry *pt; | 235 | struct drm_vma_entry *pt; |
236 | struct vm_area_struct *vma; | 236 | struct vm_area_struct *vma; |
237 | unsigned long vma_count = 0; | ||
237 | #if defined(__i386__) | 238 | #if defined(__i386__) |
238 | unsigned int pgprot; | 239 | unsigned int pgprot; |
239 | #endif | 240 | #endif |
240 | 241 | ||
241 | mutex_lock(&dev->struct_mutex); | 242 | mutex_lock(&dev->struct_mutex); |
242 | seq_printf(m, "vma use count: %d, high_memory = %pK, 0x%pK\n", | 243 | list_for_each_entry(pt, &dev->vmalist, head) |
243 | atomic_read(&dev->vma_count), | 244 | vma_count++; |
244 | high_memory, (void *)(unsigned long)virt_to_phys(high_memory)); | 245 | |
246 | seq_printf(m, "vma use count: %lu, high_memory = %pK, 0x%pK\n", | ||
247 | vma_count, high_memory, | ||
248 | (void *)(unsigned long)virt_to_phys(high_memory)); | ||
245 | 249 | ||
246 | list_for_each_entry(pt, &dev->vmalist, head) { | 250 | list_for_each_entry(pt, &dev->vmalist, head) { |
247 | vma = pt->vma; | 251 | vma = pt->vma; |
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index ef5540b6b451..24e045c4f531 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c | |||
@@ -220,7 +220,6 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) | |||
220 | 220 | ||
221 | DRM_DEBUG("0x%08lx,0x%08lx\n", | 221 | DRM_DEBUG("0x%08lx,0x%08lx\n", |
222 | vma->vm_start, vma->vm_end - vma->vm_start); | 222 | vma->vm_start, vma->vm_end - vma->vm_start); |
223 | atomic_dec(&dev->vma_count); | ||
224 | 223 | ||
225 | map = vma->vm_private_data; | 224 | map = vma->vm_private_data; |
226 | 225 | ||
@@ -405,7 +404,6 @@ void drm_vm_open_locked(struct drm_device *dev, | |||
405 | 404 | ||
406 | DRM_DEBUG("0x%08lx,0x%08lx\n", | 405 | DRM_DEBUG("0x%08lx,0x%08lx\n", |
407 | vma->vm_start, vma->vm_end - vma->vm_start); | 406 | vma->vm_start, vma->vm_end - vma->vm_start); |
408 | atomic_inc(&dev->vma_count); | ||
409 | 407 | ||
410 | vma_entry = kmalloc(sizeof(*vma_entry), GFP_KERNEL); | 408 | vma_entry = kmalloc(sizeof(*vma_entry), GFP_KERNEL); |
411 | if (vma_entry) { | 409 | if (vma_entry) { |
@@ -433,7 +431,6 @@ void drm_vm_close_locked(struct drm_device *dev, | |||
433 | 431 | ||
434 | DRM_DEBUG("0x%08lx,0x%08lx\n", | 432 | DRM_DEBUG("0x%08lx,0x%08lx\n", |
435 | vma->vm_start, vma->vm_end - vma->vm_start); | 433 | vma->vm_start, vma->vm_end - vma->vm_start); |
436 | atomic_dec(&dev->vma_count); | ||
437 | 434 | ||
438 | list_for_each_entry_safe(pt, temp, &dev->vmalist, head) { | 435 | list_for_each_entry_safe(pt, temp, &dev->vmalist, head) { |
439 | if (pt->vma == vma) { | 436 | if (pt->vma == vma) { |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 5b6c33ce776f..2fe9b5d5d162 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1109,7 +1109,6 @@ struct drm_device { | |||
1109 | /** \name Usage Counters */ | 1109 | /** \name Usage Counters */ |
1110 | /*@{ */ | 1110 | /*@{ */ |
1111 | int open_count; /**< Outstanding files open */ | 1111 | int open_count; /**< Outstanding files open */ |
1112 | atomic_t vma_count; /**< Outstanding vma areas open */ | ||
1113 | int buf_use; /**< Buffers in use -- cannot alloc */ | 1112 | int buf_use; /**< Buffers in use -- cannot alloc */ |
1114 | atomic_t buf_alloc; /**< Buffer allocation in progress */ | 1113 | atomic_t buf_alloc; /**< Buffer allocation in progress */ |
1115 | /*@} */ | 1114 | /*@} */ |