diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-08 00:45:27 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-12-08 12:29:22 +0300 |
commit | 72a93e8dd52c9feea42f1258d555e6070680a347 (patch) | |
tree | 881432ea83e9dfb888bfd5a52d5175f22703a4a9 /drivers/gpu/drm/vgem/vgem_fence.c | |
parent | f3f4c4d68a2862c361fd9890998275da5ef02724 (diff) | |
download | linux-72a93e8dd52c9feea42f1258d555e6070680a347.tar.xz |
drm: Take ownership of the dmabuf->obj when exporting
Currently the reference for the dmabuf->obj is incremented for the
dmabuf in drm_gem_prime_handle_to_fd() (at the high level userspace
interface), but is released in drm_gem_dmabuf_release() (the lowlevel
handler). Improve the symmetry of the dmabuf->obj ownership by acquiring
the reference in drm_gem_dmabuf_export(). This makes it easier to use
the prime functions directly.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Update kerneldoc.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161207214527.22533-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/vgem/vgem_fence.c')
-rw-r--r-- | drivers/gpu/drm/vgem/vgem_fence.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c index 9cb00a5d5d08..da25dfe7b80e 100644 --- a/drivers/gpu/drm/vgem/vgem_fence.c +++ b/drivers/gpu/drm/vgem/vgem_fence.c @@ -126,7 +126,6 @@ static int attach_dmabuf(struct drm_device *dev, return PTR_ERR(dmabuf); obj->dma_buf = dmabuf; - drm_gem_object_reference(obj); return 0; } |