[osal]: force mpp use drm buffer when HAVE_DRM are defined.

Force allocator use drm buffer,otherwise user will get a tuntime error
when they use kernel without /dev/ion.

Change-Id: I8151b743a9b19a03716dec3bdb909ce91b6af0b6
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
This commit is contained in:
sliver.chen
2017-11-08 16:00:29 +08:00
committed by Herman Chen
parent b625ced0af
commit 5a830697a8

View File

@@ -30,7 +30,11 @@ MPP_RET os_allocator_get(os_allocator *api, MppBufferType type)
} }
break; break;
case MPP_BUFFER_TYPE_ION : { case MPP_BUFFER_TYPE_ION : {
#ifdef HAVE_DRM
*api = allocator_drm;
#else
*api = allocator_ion; *api = allocator_ion;
#endif
} }
break; break;
case MPP_BUFFER_TYPE_DRM : { case MPP_BUFFER_TYPE_DRM : {