drm/exynos: remove mutex locking in pagefault handler
authorJoonyoung Shim <jy0922.shim@samsung.com>
Tue, 28 Jul 2015 08:53:18 +0000 (17:53 +0900)
committerInki Dae <inki.dae@samsung.com>
Sun, 16 Aug 2015 04:27:25 +0000 (13:27 +0900)
There is no reason to use mutex locking in pagefault handler.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_gem.c

index f717d795e9ae3458e808dfdcadf7e2ac8382e639..0c53b858bfec85355ee9d9f5a833bf6b7b0d9a78 100644 (file)
@@ -560,7 +560,6 @@ unlock:
 int exynos_drm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
        struct drm_gem_object *obj = vma->vm_private_data;
-       struct drm_device *dev = obj->dev;
        unsigned long f_vaddr;
        pgoff_t page_offset;
        int ret;
@@ -569,14 +568,10 @@ int exynos_drm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
                        vma->vm_start) >> PAGE_SHIFT;
        f_vaddr = (unsigned long)vmf->virtual_address;
 
-       mutex_lock(&dev->struct_mutex);
-
        ret = exynos_drm_gem_map_buf(obj, vma, f_vaddr, page_offset);
        if (ret < 0)
                DRM_ERROR("failed to map a buffer with user.\n");
 
-       mutex_unlock(&dev->struct_mutex);
-
        switch (ret) {
        case 0:
        case -ERESTARTSYS: