mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 19:56:40 +07:00
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
This commit is contained in:
parent
2f42420084
commit
e34274fd2a
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user