diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-03-30 11:40:49 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-04-20 12:58:17 +0200 |
commit | e34274fd2aa84fb4b609e26af18507449e8feaca (patch) | |
tree | 6cc0d0938273a2c5d17da12d76abaeed86a7efa9 /drivers | |
parent | 2f42420084a7f79400700b2362ba802a824b8072 (diff) | |
download | linux-e34274fd2aa84fb4b609e26af18507449e8feaca.tar.gz linux-e34274fd2aa84fb4b609e26af18507449e8feaca.tar.bz2 linux-e34274fd2aa84fb4b609e26af18507449e8feaca.zip |
drm/vgem: Simplify dumb_map
The offset manager already checks for existing offsets internally,
while holding suitable locks. We can drop this check.
v2: Fix title (Emil).
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-11-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/vgem/vgem_drv.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index c503a840fd88..f3ee1c41da1e 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -208,11 +208,9 @@ int vgem_gem_dumb_map(struct drm_file *file, struct drm_device *dev, goto unlock; } - if (!drm_vma_node_has_offset(&obj->vma_node)) { - ret = drm_gem_create_mmap_offset(obj); - if (ret) - goto unref; - } + ret = drm_gem_create_mmap_offset(obj); + if (ret) + goto unref; BUG_ON(!obj->filp); |