[ion]: file descriptor for the external buffer

The imported buffer may be released from its origin allocator,
I would suggest to use the new file descriptor from new ion
handle.

The ion only has map_user() to export buffer to userspace,
There is no unmap_user() because the mapping is represented as
a file descriptor in user space. The closing of that file
descriptor will cause the memory to be unmapped from
the calling process.

Change-Id: Ief855aab11793238b40b73da92af853ca3b58349
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: ayaka <ayaka@soulik.info>
This commit is contained in:
Randy Li
2017-05-10 09:29:42 +08:00
committed by Herman Chen
parent 167c7dd9cf
commit c56a9365f6
2 changed files with 11 additions and 32 deletions

View File

@@ -18,8 +18,10 @@
#include "mpp_log.h"
#include "allocator_std.h"
#include "allocator_drm.h"
#include "allocator_ion.h"
#ifdef HAVE_DRM
#include "allocator_drm.h"
#endif
/*
* Linux only support MPP_BUFFER_TYPE_NORMAL so far