drm/prime: Simplify drm_gem_remove_prime_handles
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 14 Aug 2013 22:02:47 +0000 (00:02 +0200)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Wed, 13 Jan 2016 01:29:22 +0000 (10:29 +0900)
commit92b6cccaf16b10f6075a65f3085d07c882d90dfb
tree3acd29174634b32c90c304da258c2a906390bff3
parent1b9348e3473ef2489847b4b19b7a2d73142076ac
drm/prime: Simplify drm_gem_remove_prime_handles

with the reworking semantics and locking of the obj->dma_buf pointer
this pointer is always set as long as there's still a gem handle
around and a dma_buf associated with this gem object.

Also, the per file-priv lookup-cache for dma-buf importing is also
unified between foreign and native objects.

Hence we don't need to special case the clean any more and can simply
drop the clause which only runs for foreing objects, i.e. with
obj->import_attach set.

Note that with this change (actually with the previous one to always
set up obj->dma_buf even for foreign objects) it is no longer required
to set obj->import_attach when importing a foreing object. So update
comments accordingly, too.

Change-Id: If153ff3c09c4380b86497d7cb26b5b02b40ec020
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_gem.c
include/drm/drmP.h