Skip to content

Commit e4aab4c

Browse files
zhangyichixJeevakaPrabu
authored andcommitted
Fixed compilation issues in Android
Signed-off-by: zhangyichix <[email protected]> Signed-off-by: zhepeng.xu <[email protected]>
1 parent 33f00be commit e4aab4c

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

cmrtlib/linux/hardware/cm_device_os.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,10 @@ CmDevice_RT::CmDevice_RT(
493493
m_gtpinBufferUP1(nullptr),
494494
m_gtpinBufferUP2(nullptr),
495495
m_createOption(createOption),
496-
m_driverStoreEnabled(0),
497-
m_driFileDescriptor(0)
496+
#if !defined(ANDROID)
497+
m_driFileDescriptor(0),
498+
#endif
499+
m_driverStoreEnabled(0)
498500
{
499501

500502
// New Surface Manager

media_driver/linux/common/ddi/media_libva.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <va/va_backend_prot.h>
4444
#endif
4545
#ifdef ANDROID
46+
#include <va/va_android.h>
4647
#if VA_MAJOR_VERSION < 1
4748
#include "va_internal_android.h"
4849
#endif

media_softlet/agnostic/common/vp/hal/bufferMgr/vp_allocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ MOS_STATUS VpAllocator::AllocParamsInitType(
740740
VP_FUNC_CALL();
741741
VP_PUBLIC_CHK_NULL_RETURN(surface);
742742

743-
#if !EMUL && !LINUX
743+
#if !EMUL && !LINUX && !ANDROID
744744
// Need to reallocate surface according to expected tiletype instead of tiletype of the surface what we have
745745
if ( surface != nullptr &&
746746
surface->OsResource.pGmmResInfo != nullptr &&
@@ -1483,4 +1483,4 @@ MOS_HW_RESOURCE_DEF VpAllocator::GetResourceCache(uint32_t feature, bool bOut, E
14831483

14841484
VP_PUBLIC_NORMALMESSAGE("Resource %u was found in cache manager, use mocs usage %u!", feature, element.mocsUsageType);
14851485
return element.mocsUsageType;
1486-
}
1486+
}

media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3932,7 +3932,7 @@ bool KernelDll_BuildKernel_CmFc(Kdll_State *pState, Kdll_SearchState *pSearchSta
39323932
VP_RENDER_FUNCTION_ENTER;
39333933

39343934
// Disable pop-up box window for STL assertion to avoid VM hang in auto test.
3935-
#if (!LINUX)
3935+
#if (!LINUX && !ANDROID)
39363936
uint32_t prevErrorMode = ::SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
39373937
#if defined(_MSC_VER)
39383938
::_set_error_mode(_OUT_TO_STDERR);
@@ -4062,7 +4062,7 @@ bool KernelDll_BuildKernel_CmFc(Kdll_State *pState, Kdll_SearchState *pSearchSta
40624062
res = true;
40634063

40644064
finish:
4065-
#if (!LINUX)
4065+
#if (!LINUX && !ANDROID)
40664066
::SetErrorMode(prevErrorMode);
40674067
#endif
40684068
return res;
@@ -4468,4 +4468,4 @@ bool KernelDll_SetupFunctionPointers_Ext(
44684468

44694469
#ifdef __cplusplus
44704470
}
4471-
#endif // __cplusplus
4471+
#endif // __cplusplus

media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <sys/types.h>
4141
#include <sys/sem.h>
4242
#include <sys/mman.h>
43-
#include "mos_compat.h" // libc variative definitions: backtrace
43+
//#include "mos_compat.h" // libc variative definitions: backtrace
4444
#include "mos_user_setting.h"
4545
#include "mos_utilities_specific.h"
4646
#include "mos_utilities.h"

0 commit comments

Comments
 (0)