Skip to contentSkip to conversation

drm: rip out vma accounting for gem mmaps

PATCH In review Daniel Vetter 2 participants 2 messages Dec 18, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: rip out vma accounting for gem mmaps

Doesn't really add anything which can't be figured out through proc files. And more clearly separates the new gem mmap handling code from the old drm maps mmap handling code, which is surely a good thing.

---
 drivers/gpu/drm/drm_gem.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/gpu/drm/drm_gem.c +1 -10
index 24efae4..816c588 100644
@@ -633,10 +633,6 @@ void drm_gem_vm_open(struct vm_area_struct *vma)
 	struct drm_gem_object *obj = vma->vm_private_data;
 
 	drm_gem_object_reference(obj);
-
-	mutex_lock(&obj->dev->struct_mutex);
-	drm_vm_open_locked(obj->dev, vma);
-	mutex_unlock(&obj->dev->struct_mutex);
 }
 EXPORT_SYMBOL(drm_gem_vm_open);
 
@@ -645,10 +641,7 @@ void drm_gem_vm_close(struct vm_area_struct *vma)
 	struct drm_gem_object *obj = vma->vm_private_data;
 	struct drm_device *dev = obj->dev;
 
-	mutex_lock(&dev->struct_mutex);
-	drm_vm_close_locked(obj->dev, vma);
-	drm_gem_object_unreference(obj);
-	mutex_unlock(&dev->struct_mutex);
+	drm_gem_object_unreference_unlocked(obj);
 }
 EXPORT_SYMBOL(drm_gem_vm_close);
 
@@ -719,8 +712,6 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
 	 */
 	drm_gem_object_reference(obj);
 
-	drm_vm_open_locked(dev, vma);
-
 out_unlock:
 	mutex_unlock(&dev->struct_mutex);
 
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Daniel Vetter

Doesn't really add anything which can't be figured out through proc files.

(grep /dev/dri /proc/$pid/maps)

Quoted 6 lines

And more clearly separates the new gem mmap handling code from the old drm maps mmap handling code, which is surely a good thing.

I'm biased as I've never used this feature, just bemoaned it.

-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre