[osal]: add new buffer type for DMA import buffer

This buffer type is used for the buffer coming from the
application, the application should make sure those
buffers are the dma buffer.

Change-Id: I2c8491f4dea77e5d7ae8d9157b0a1eda204f4bd6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
This commit is contained in:
Randy Li
2018-04-12 17:34:30 +08:00
committed by Herman Chen
parent 35cb04f7bb
commit a78598dab5
8 changed files with 191 additions and 17 deletions

View File

@@ -18,9 +18,10 @@
#include "mpp_log.h"
#include "mpp_runtime.h"
#include "allocator_std.h"
#include "allocator_ion.h"
#include "allocator_drm.h"
#include "allocator_ext_dma.h"
#include "allocator_ion.h"
#include "allocator_std.h"
/*
* Linux only support MPP_BUFFER_TYPE_NORMAL so far
@@ -41,9 +42,8 @@ MPP_RET os_allocator_get(os_allocator *api, MppBufferType type)
#endif
allocator_std;
} break;
case MPP_BUFFER_TYPE_V4L2 : {
mpp_err("os_allocator_get Linux MPP_BUFFER_TYPE_V4L2 do not implement yet\n");
*api = allocator_std;
case MPP_BUFFER_TYPE_EXT_DMA: {
*api = allocator_ext_dma;
} break;
case MPP_BUFFER_TYPE_DRM : {
#if HAVE_DRM