[osal]: add drm allocator for linux system

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@857 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ZhaoJun
2016-06-01 10:40:31 +00:00
parent 31a488585e
commit 3ae8f919c5
7 changed files with 1831 additions and 0 deletions

View File

@@ -16,9 +16,14 @@
#include <stdio.h>
#include <linux/drm.h>
#include <linux/drm_mode.h>
#include "os_mem.h"
#include "os_allocator.h"
#include "allocator_drm.h"
#include "mpp_mem.h"
#include "mpp_log.h"
@@ -111,6 +116,9 @@ MPP_RET os_allocator_get(os_allocator *api, MppBufferType type)
case MPP_BUFFER_TYPE_V4L2 : {
mpp_err("os_allocator_get Linux MPP_BUFFER_TYPE_V4L2 do not implement yet\n");
*api = allocator_v4l2;
} break;
case MPP_BUFFER_TYPE_DRM : {
*api = allocator_drm;
} break;
default : {
ret = MPP_NOK;