From patchwork Tue Dec 18 13:57:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1892051 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 3DA973FCD4 for ; Tue, 18 Dec 2012 13:56:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 420DFE6296 for ; Tue, 18 Dec 2012 05:56:26 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D282E5C6E for ; Tue, 18 Dec 2012 05:56:14 -0800 (PST) Received: by mail-ee0-f42.google.com with SMTP id c41so347292eek.15 for ; Tue, 18 Dec 2012 05:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=u3Anz04wvdANqjiup2vHSMqnaI/XVeQehm+NF6+Adlo=; b=D5EF0vQGWmMDi0CgjoJaHHxyfJ/h6zdFEjA3eKWlFn2k81lIluC6xZ3pEbajlOgzFs VoTJuQommP+kJ3mYfmgESJhHQXXHa3i8hHsJC154j5cXfAHGjlwcZNDlwV0kPB3GhrlM FFOgZhvmqGdxdbVUJ3Lr/gC212yXxdctdOC+g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=u3Anz04wvdANqjiup2vHSMqnaI/XVeQehm+NF6+Adlo=; b=OkljYMVxKz2sEpeFZBpZUtnhU8yWmVfBSBPB5I/TXuy7sEcMlHBdYtFW7FRHQJnUy7 4jdBLbWJRZXGD1n/Oy2xYVR1jcm9b2mGBNcnWdqRIF3Pj9MquhB4NklZbxjUEUlWfWZO bSh6nH+HJOniGpwRfrbmMF32yYCppmAfu9UYvSSb1hj2xCvzA/t9DwhBuYhlckjpNLJe UiQHvNGmQmZhXPFkwWU4130eK9kERLcQWp2Brp4wQ6agRP6LHhu8Nttt0Y+frW7aUVUJ b7QKg9fGwIox2bw8Yiv6hBPYKpI6N37c/rAh3LP3THLMUKFa/udl7TDc8v+GJICnvoBp 8Tzg== X-Received: by 10.14.173.69 with SMTP id u45mr5829611eel.21.1355838973022; Tue, 18 Dec 2012 05:56:13 -0800 (PST) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id l3sm3366583eem.14.2012.12.18.05.56.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Dec 2012 05:56:12 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH] drm: rip out vma accounting for gem mmaps Date: Tue, 18 Dec 2012 14:57:45 +0100 Message-Id: <1355839065-6910-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQl843YaYrZ7NJXXfv18KhdAo9sjqMtfHtgDBVVx68smr/duf05zBTG00pArwCuqNsDRiopN Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org 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 Signed-off-by: Daniel Vetter Acked-by: Chris Wilson --- 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);