Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android bp revised #1865

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,280 changes: 2,280 additions & 0 deletions Android.bp

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions cmrtlib/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// Copyright (c) 2024, Intel Corporation

// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

cc_library_shared {
name: "libigfxcmrt",

srcs: [
"agnostic/share/cm_printf_host.cpp",
"agnostic/share/cm_rt_helpers.cpp",
"agnostic/share/cm_avs_state_msg_ex.cpp",
"agnostic/hardware/cm_device.cpp",
"agnostic/hardware/cm_device_export.cpp",
"agnostic/hardware/cm_surface_manager.cpp",
"agnostic/hardware/cm_timer.cpp",
"agnostic/hardware/cm_queue.cpp",
"agnostic/hardware/cm_perf_statistics.cpp",
"agnostic/hardware/cm_kernel_debugger.cpp",
"linux/share/cm_performance.cpp",
"linux/hardware/cm_device_os.cpp",
"linux/hardware/cm_surface_manager_os.cpp",
"linux/hardware/cm_device_export_os.cpp",
"linux/hardware/cm_timer_os.cpp",
],

local_include_dirs: [
"agnostic/share",
"agnostic/hardware",
"linux/share",
"linux/hardware",
],

cflags: [
"-Werror",
"-Wno-unused-variable",
"-Wno-unused-parameter",
"-Wno-unused-private-field",
"-Wno-non-virtual-dtor",
"-Wno-implicit-fallthrough",
"-DCM_RT_EXPORTS",
"-DISTDLIB_UMD",
"-DVPHAL",
"-D__CT__",
],

header_libs: [
"libva_headers",
],

shared_libs: [
"libc",
"libdl",
"libcutils",
"liblog",
"libutils",
"libm",
"libva",
"libva-android",
],
vendor: true,
enabled: false,
arch: {
x86_64: {
enabled: true,
},
},
}

cc_library_headers {
name: "libcmrt_headers",
export_include_dirs: [
"linux/hardware",
],

vendor: true,
enabled: false,
arch: {
x86_64: {
enabled: true,
},
},
}
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