Skip to content

Commit

Permalink
Fixed compilation issues in Android
Browse files Browse the repository at this point in the history
Change-Id: I031365909dbaec29e4c998891e28c16e7f38e530
Signed-off-by: zhangyichix <[email protected]>
Signed-off-by: zhepeng.xu <[email protected]>
Signed-off-by: JeevakaPrabu <[email protected]>
  • Loading branch information
zhangyichix authored and intel-mediadev committed Nov 4, 2024
1 parent 95483a2 commit 09f7a58
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
10 changes: 6 additions & 4 deletions cmrtlib/linux/hardware/cm_device_os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,18 +483,20 @@ CmDevice_RT::CmDevice_RT(
m_deviceInUmd(nullptr),
m_cmCreated(true),
m_vaDisplay(vaDisplay),
m_drmIndex(0),
m_fvaCmExtSendReqMsg(nullptr),
#ifdef ANDROID
m_display(nullptr),
#endif
m_drmIndex(0),
m_fvaCmExtSendReqMsg(nullptr),
m_gtpinEnabled(false),
m_gtpinBufferUP0(nullptr),
m_gtpinBufferUP1(nullptr),
m_gtpinBufferUP2(nullptr),
m_createOption(createOption),
m_driverStoreEnabled(0),
m_driFileDescriptor(0)
#if !defined(ANDROID)
m_driFileDescriptor(0),
#endif
m_driverStoreEnabled(0)
{

// New Surface Manager
Expand Down
1 change: 1 addition & 0 deletions media_driver/linux/common/ddi/media_libva.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <va/va_backend_prot.h>
#endif
#ifdef ANDROID
#include <va/va_android.h>
#if VA_MAJOR_VERSION < 1
#include "va_internal_android.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ MOS_STATUS VpAllocator::AllocParamsInitType(
VP_FUNC_CALL();
VP_PUBLIC_CHK_NULL_RETURN(surface);

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

VP_PUBLIC_NORMALMESSAGE("Resource %u was found in cache manager, use mocs usage %u!", feature, element.mocsUsageType);
return element.mocsUsageType;
}
}
6 changes: 3 additions & 3 deletions media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c
Original file line number Diff line number Diff line change
Expand Up @@ -3932,7 +3932,7 @@ bool KernelDll_BuildKernel_CmFc(Kdll_State *pState, Kdll_SearchState *pSearchSta
VP_RENDER_FUNCTION_ENTER;

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

finish:
#if (!LINUX)
#if (!LINUX && !ANDROID)
::SetErrorMode(prevErrorMode);
#endif
return res;
Expand Down Expand Up @@ -4468,4 +4468,4 @@ bool KernelDll_SetupFunctionPointers_Ext(

#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __cplusplus
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <sys/types.h>
#include <sys/sem.h>
#include <sys/mman.h>
#include "mos_compat.h" // libc variative definitions: backtrace
#include "mos_user_setting.h"
#include "mos_utilities_specific.h"
#include "mos_utilities.h"
Expand Down
1 change: 0 additions & 1 deletion media_softlet/linux/common/os/xe/mos_bufmgr_xe.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include <signal.h>
#include <pciaccess.h>
#include <getopt.h>
#include <stdlib.h>
#include <unistd.h>
Expand Down

0 comments on commit 09f7a58

Please sign in to comment.