All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: rip out vma accounting for gem mmaps
@ 2012-12-18 13:57 Daniel Vetter
  2012-12-18 14:54 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2012-12-18 13:57 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter

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.

Cc:  Martin Peres <martin.peres@free.fr>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_gem.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 24efae4..816c588 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -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);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm: rip out vma accounting for gem mmaps
  2012-12-18 13:57 [PATCH] drm: rip out vma accounting for gem mmaps Daniel Vetter
@ 2012-12-18 14:54 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2012-12-18 14:54 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter

On Tue, 18 Dec 2012 14:57:45 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Doesn't really add anything which can't be figured out through
> proc files.

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

> And more clearly separates the new gem mmap handling
> code from the old drm maps mmap handling code, which is surely a
> good thing.
> 
> Cc:  Martin Peres <martin.peres@free.fr>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I'm biased as I've never used this feature, just bemoaned it.
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-18 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18 13:57 [PATCH] drm: rip out vma accounting for gem mmaps Daniel Vetter
2012-12-18 14:54 ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.