From 673bc0eef4c21b3dad3023a2c0d64162fd3fc5ec Mon Sep 17 00:00:00 2001 From: Herman Chen Date: Tue, 6 Sep 2016 16:22:58 +0800 Subject: [PATCH] [osal]: fix allocator error on x86_64 x86_64 is for simulation debug. It is just for working flow test. Change-Id: I2d1cb50e52a104e58f6eaf3b27fd9dcf41b9ada6 Signed-off-by: Herman Chen --- build/linux/x86_64/make-Makefiles.bash | 6 +++++- osal/linux/os_allocator.c | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/build/linux/x86_64/make-Makefiles.bash b/build/linux/x86_64/make-Makefiles.bash index d8b4df97..9c8877d1 100755 --- a/build/linux/x86_64/make-Makefiles.bash +++ b/build/linux/x86_64/make-Makefiles.bash @@ -1,3 +1,7 @@ #!/bin/bash # Run this from within a bash shell -cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_RKPLATFORM_ENABLE=ON ../../../ && ccmake ../../../ +# x86_64 is for simulation do not enable RK platform +cmake -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=debug \ + -DCMAKE_RKPLATFORM_ENABLE=OFF \ + ../../../ && ccmake ../../../ diff --git a/osal/linux/os_allocator.c b/osal/linux/os_allocator.c index f45701d9..8b532cf0 100644 --- a/osal/linux/os_allocator.c +++ b/osal/linux/os_allocator.c @@ -138,7 +138,11 @@ MPP_RET os_allocator_get(os_allocator *api, MppBufferType type) *api = allocator_normal; } break; case MPP_BUFFER_TYPE_ION : { +#ifdef RKPLATFORM *api = allocator_ion; +#else + *api = allocator_normal; +#endif } break; case MPP_BUFFER_TYPE_V4L2 : { mpp_err("os_allocator_get Linux MPP_BUFFER_TYPE_V4L2 do not implement yet\n");