OSDN Git Service

vc4: add hash table look-up for exported dmabufs
authorRob Herring <robh@kernel.org>
Fri, 22 Jul 2016 20:28:30 +0000 (15:28 -0500)
committerEric Anholt <eric@anholt.net>
Tue, 26 Jul 2016 20:47:50 +0000 (13:47 -0700)
commit9ace2c13550609dfe78164f104500d438821f383
tree1b556d0fe722c7bb2603786ebdd1bf49a0ba8068
parentce8504d196291452b42ed755ed3830ecb16febcd
vc4: add hash table look-up for exported dmabufs

It is necessary to reuse existing BOs when dmabufs are imported. There
are 2 cases that need to be handled. dmabufs can be created/exported and
imported by the same process and can be imported multiple times.
Copying other drivers, add a hash table to track exported BOs so the
BOs get reused.

v2: Whitespace fixup (by anholt)

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/vc4/vc4_bufmgr.c
src/gallium/drivers/vc4/vc4_bufmgr.h
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/vc4/vc4_screen.h