summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500/psb_drv.h
diff options
context:
space:
mode:
authorDaniel Vetter2015-11-23 10:32:53 +0100
committerDaniel Vetter2015-12-01 10:05:11 +0100
commit737292a3c0f251a93dcce4bedf7e4accb35335bc (patch)
tree6849b21eb6b3ac4601174a91763c41dc5b6db95e /drivers/gpu/drm/gma500/psb_drv.h
parentdrm/gma500: Drop dev->struct_mutex from mmap offset function (diff)
downloadkernel-qcow2-linux-737292a3c0f251a93dcce4bedf7e4accb35335bc.tar.gz
kernel-qcow2-linux-737292a3c0f251a93dcce4bedf7e4accb35335bc.tar.xz
kernel-qcow2-linux-737292a3c0f251a93dcce4bedf7e4accb35335bc.zip
drm/gma500: Add driver private mutex for the fault handler
There's currently two places where the gma500 fault handler relies upon dev->struct_mutex: - To protect r->mappping - To make sure vm_insert_pfn isn't called concurrently (in which case the 2nd thread would get an error code). Everything else (specifically psb_gtt_pin) is already protected by some other locks. Hence just create a new driver-private mmap_mutex just for this function. With this gma500 is complete dev->struct_mutex free! Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1448271183-20523-21-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/gma500/psb_drv.h')
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
index e21726ecac32..3bd2c726dd61 100644
--- a/drivers/gpu/drm/gma500/psb_drv.h
+++ b/drivers/gpu/drm/gma500/psb_drv.h
@@ -465,6 +465,8 @@ struct drm_psb_private {
struct mutex gtt_mutex;
struct resource *gtt_mem; /* Our PCI resource */
+ struct mutex mmap_mutex;
+
struct psb_mmu_driver *mmu;
struct psb_mmu_pd *pf_pd;