[drm]: add macro control in os_allocator.c

1. fix compiling error of previous commit
2. can enable drm on x86 pc linux platform

Change-Id: I06271fe0efcaa7de2531c7fb3e21bf9c75781beb
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Jung Zhao
2016-10-07 17:10:02 +08:00
committed by Herman Chen
parent e9b7563de2
commit deb649610c
4 changed files with 10 additions and 121 deletions

View File

@@ -149,7 +149,11 @@ MPP_RET os_allocator_get(os_allocator *api, MppBufferType type)
*api = allocator_v4l2;
} break;
case MPP_BUFFER_TYPE_DRM : {
#ifdef HAVE_DRM
*api = allocator_drm;
#else
*api = allocator_normal;
#endif
} break;
default : {
ret = MPP_NOK;