diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-11-17 11:23:17 +0100 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2018-01-02 17:04:18 +0100 |
commit | 783c06cb9c9072ff87903cce73317209b3af8568 (patch) | |
tree | 16799455d81e272e725750dfb8e782748cc9536e /drivers/gpu | |
parent | d6a8743dd8cc1e2ca5e40e07fe3de7557ac117a0 (diff) | |
download | kernel_replicant_linux-783c06cb9c9072ff87903cce73317209b3af8568.tar.gz kernel_replicant_linux-783c06cb9c9072ff87903cce73317209b3af8568.tar.bz2 kernel_replicant_linux-783c06cb9c9072ff87903cce73317209b3af8568.zip |
drm/etnaviv: add lockdep annotation for userptr object population
The current userptr page population will defer work to a work item if
needed to avoid ever taking the mmap_sem in the direct call path. With
the more fine-grained locking in etnaviv this isn't needed anymore, so
a future commit will simplify this code.
Add a lockdep annotation to validate the assumption that the mmap_sem
can be taken in the direct call path.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index e3582507963d..555a331c51a9 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c @@ -804,6 +804,8 @@ static int etnaviv_gem_userptr_get_pages(struct etnaviv_gem_object *etnaviv_obj) struct mm_struct *mm; int ret, pinned, npages = etnaviv_obj->base.size >> PAGE_SHIFT; + might_lock_read(¤t->mm->mmap_sem); + if (etnaviv_obj->userptr.work) { if (IS_ERR(etnaviv_obj->userptr.work)) { ret = PTR_ERR(etnaviv_obj->userptr.work); |