summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGowtham Tammana2016-06-20 18:08:36 -0500
committerGowtham Tammana2016-06-21 10:08:34 -0500
commit34ed80f505fea5d81a895c554312f9918de82ec9 (patch)
tree373271c66a211e336bad3546ddd4042553bd3689 /jacinto6
parenta963c5d6bd49269a81d83ce1122a507f3768beaf (diff)
downloaddevice-ti-proprietary-open-34ed80f505fea5d81a895c554312f9918de82ec9.tar.gz
device-ti-proprietary-open-34ed80f505fea5d81a895c554312f9918de82ec9.tar.xz
device-ti-proprietary-open-34ed80f505fea5d81a895c554312f9918de82ec9.zip
jacinto6: sgx-bin: bins and src update for ddk1.14
Updating SGX binaries and KM source update for DDK1.14 on k4.4 Change-Id: Ie51645aa42e31c620f2e50cdb1efd570a1ef7227 Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
Diffstat (limited to 'jacinto6')
-rw-r--r--jacinto6/README.SGX10
-rw-r--r--jacinto6/sgx.tgzbin2922163 -> 3120633 bytes
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk3
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk24
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk29
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk19
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk143
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk2
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk134
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk14
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk17
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk8
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk25
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk61
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk5
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk6
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk1
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile39
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile113
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile4
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/img_defs.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvr_debug.h71
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvrversion.h16
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/services.h72
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/servicesext.h16
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgxapi_km.h15
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_displayclass.c23
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c9
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c20
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/ion_sys_private.h50
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/kerneldisplay.h12
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge.h97
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge_km.h28
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/servicesint.h13
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_mkif_km.h16
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_ukernel_status_codes.h5
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgxinfo.h14
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c301
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c64
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/buffer_manager.c144
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c94
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/devicemem.c637
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/handle.c4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/hash.c3
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pdump_common.c57
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c68
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/queue.c140
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/ra.c15
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/refcount.c97
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/resman.c6
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/mmu.c108
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxconfig.h188
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinfokm.h15
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxkick.c225
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxpower.c52
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxreset.c6
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxtransfer.c57
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.c23
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/Kbuild.mk13
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c460
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.h27
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c135
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/linkage.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/lma_heap_ion.h45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.c153
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.h14
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.c12
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c73
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.c13
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h12
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c146
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c6
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_debug.c11
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c111
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.h12
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_linux_fence.c1371
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_linux_fence.h71
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_sync.c105
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxdefs.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h24
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxfeaturedefs.h11
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/buffer_manager.h45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/dmabuf_sync.h69
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ion_sync.h (renamed from jacinto6/sgx_src/eurasia_km/services4/srvkm/include/external_sync.h)24
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/osfunc.h15
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/refcount.h83
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/resman.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/srvkm.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c24
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/syslocal.h9
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv.c52
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/linux/main.c1
96 files changed, 4837 insertions, 1817 deletions
diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX
index 5ec452a..639da2c 100644
--- a/jacinto6/README.SGX
+++ b/jacinto6/README.SGX
@@ -1,7 +1,7 @@
1/* 1/*
2 * TECHNOLOGY AND SOFTWARE PUBLICLY AVAILABLE 2 * TECHNOLOGY AND SOFTWARE PUBLICLY AVAILABLE
3 * 3 *
4 * Copyright (c) 2011, Texas Instruments Incorporated. 4 * Copyright (c) 2016, Texas Instruments Incorporated.
5 * 5 *
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
@@ -14,11 +14,11 @@
14sgx.tgz a set of binaries built for SGX544. 14sgx.tgz a set of binaries built for SGX544.
15 15
16[DDK Version] 16[DDK Version]
17 1.12/2917986 17 1.14/4001660
18[DDK commit ID] 18[DDK commit ID]
19 ab0b57a tmp: Disable DVFS and SYNC for kernel 4.4 19 036d7d2 (HACK) SGX-UM: Copy pvrsrvctl as pvrsrvinit
20[Branch] 20[Branch]
21 android/1.12/2917986_k4.4 21 android/1.14/4001660_k4.4_M
22[Kernel modules built against] 22[Kernel modules built against]
23 Kernel Version: 4.4.y with CONFIG_MODVERSIONS=y 23 Kernel Version: 4.4.y with CONFIG_MODVERSIONS=y
24[Build type] 24[Build type]
@@ -35,7 +35,7 @@ Make sure kernel is built before building modules
35# export KERNELDIR=path_to_kernel 35# export KERNELDIR=path_to_kernel
36# export PATH=<path to kernel toolchain>:$PATH 36# export PATH=<path to kernel toolchain>:$PATH
37 37
38To build for OMAP5 (SGX 544 multi core): 38To build for Jacinto6 (SGX 544 multi core):
39# make ARCH=arm KERNEL_CROSS_COMPILE=arm-eabi- CROSS_COMPILE=arm-eabi- TARGET_PRODUCT="jacinto6evm" BUILD=release 39# make ARCH=arm KERNEL_CROSS_COMPILE=arm-eabi- CROSS_COMPILE=arm-eabi- TARGET_PRODUCT="jacinto6evm" BUILD=release
40 40
41Once the .ko is built, install it onto device (/system/lib/modules) 41Once the .ko is built, install it onto device (/system/lib/modules)
diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz
index e25233e..5f9cd9f 100644
--- a/jacinto6/sgx.tgz
+++ b/jacinto6/sgx.tgz
Binary files differ
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
index ce0608c..b93243b 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
@@ -76,7 +76,7 @@ COMMON_USER_FLAGS += -fno-strict-aliasing
76# We always enable debugging. Either the release binaries are stripped 76# We always enable debugging. Either the release binaries are stripped
77# and the symbols put in the symbolpackage, or we're building debug. 77# and the symbols put in the symbolpackage, or we're building debug.
78# 78#
79COMMON_USER_FLAGS += -g 79COMMON_USER_FLAGS += -g $(ANDROID_FPGA_FORCE_32BIT)
80 80
81# User C and User C++ warning flags 81# User C and User C++ warning flags
82# 82#
@@ -167,6 +167,7 @@ TESTED_KBUILD_FLAGS := \
167 $(call kernel-cc-option,-Wno-pointer-arith) \ 167 $(call kernel-cc-option,-Wno-pointer-arith) \
168 $(call kernel-cc-option,-Wno-aggregate-return) \ 168 $(call kernel-cc-option,-Wno-aggregate-return) \
169 $(call kernel-cc-option,-Wno-unused-but-set-variable) \ 169 $(call kernel-cc-option,-Wno-unused-but-set-variable) \
170 $(call kernel-cc-option,-Wno-old-style-declaration) \
170 $(call kernel-cc-optional-warning,-Wbad-function-cast) \ 171 $(call kernel-cc-optional-warning,-Wbad-function-cast) \
171 $(call kernel-cc-optional-warning,-Wcast-qual) \ 172 $(call kernel-cc-optional-warning,-Wcast-qual) \
172 $(call kernel-cc-optional-warning,-Wcast-align) \ 173 $(call kernel-cc-optional-warning,-Wcast-align) \
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
index 093bb1c..ab7a0e9 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
@@ -88,7 +88,7 @@ endef
88define target-executable-from-o 88define target-executable-from-o
89$(if $(V),,@echo " LD " $(call relative-to-top,$@)) 89$(if $(V),,@echo " LD " $(call relative-to-top,$@))
90$(CC) \ 90$(CC) \
91 $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ 91 $(SYS_EXE_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
92 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \ 92 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
93 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) 93 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
94endef 94endef
@@ -96,7 +96,7 @@ endef
96define target-executable-cxx-from-o 96define target-executable-cxx-from-o
97$(if $(V),,@echo " LD " $(call relative-to-top,$@)) 97$(if $(V),,@echo " LD " $(call relative-to-top,$@))
98$(CXX) \ 98$(CXX) \
99 $(SYS_EXE_LDFLAGS_CXX) $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ 99 $(SYS_EXE_LDFLAGS_CXX) $(SYS_EXE_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
100 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \ 100 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
101 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) 101 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
102endef 102endef
@@ -104,7 +104,7 @@ endef
104define target-shared-library-from-o 104define target-shared-library-from-o
105$(if $(V),,@echo " LD " $(call relative-to-top,$@)) 105$(if $(V),,@echo " LD " $(call relative-to-top,$@))
106$(CC) -shared -Wl,-Bsymbolic \ 106$(CC) -shared -Wl,-Bsymbolic \
107 $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ 107 $(SYS_LIB_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
108 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \ 108 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
109 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) 109 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
110endef 110endef
@@ -114,7 +114,7 @@ endef
114define target-shared-library-cxx-from-o 114define target-shared-library-cxx-from-o
115$(if $(V),,@echo " LD " $(call relative-to-top,$@)) 115$(if $(V),,@echo " LD " $(call relative-to-top,$@))
116$(CXX) -shared -Wl,-Bsymbolic \ 116$(CXX) -shared -Wl,-Bsymbolic \
117 $(SYS_LIB_LDFLAGS_CXX) $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ 117 $(SYS_LIB_LDFLAGS_CXX) $(SYS_LIB_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
118 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \ 118 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
119 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) 119 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
120endef 120endef
@@ -183,7 +183,11 @@ define make-directory
183$(MKDIR) -p $@ 183$(MKDIR) -p $@
184endef 184endef
185 185
186define check-exports-from-file
187endef
188
186define check-exports 189define check-exports
190$(call check-exports-from-file,$(if $1,$1,$(notdir $@).txt))
187endef 191endef
188 192
189# Programs used in recipes 193# Programs used in recipes
@@ -197,6 +201,7 @@ JAR ?= jar
197JAVA ?= java 201JAVA ?= java
198JAVAC ?= javac 202JAVAC ?= javac
199ZIP ?= zip 203ZIP ?= zip
204PKG_CONFIG ?= pkg-config
200 205
201ifeq ($(USE_CCACHE),1) 206ifeq ($(USE_CCACHE),1)
202CCACHE ?= ccache 207CCACHE ?= ccache
@@ -228,10 +233,10 @@ override CC := $(if $(V),,@)$(CCACHE) $(CC)
228override CXX := $(if $(V),,@)$(CCACHE) $(CXX) 233override CXX := $(if $(V),,@)$(CCACHE) $(CXX)
229endif 234endif
230 235
231override AR := $(if $(V),,@)$(CROSS_COMPILE)ar 236override AR := $(if $(V),,@)$(CROSS_COMPILE)ar
232override BISON := $(if $(V),,@)$(BISON) 237override BISON := $(if $(V),,@)$(BISON)
233override BZIP2 := $(if $(V),,@)bzip2 -9 238override BZIP2 := $(if $(V),,@)bzip2 -9
234override CP := $(if $(V),,@)cp 239override CP := $(if $(V),,@)cp
235override ECHO := $(if $(V),,@)echo 240override ECHO := $(if $(V),,@)echo
236override FLEX := $(if $(V),,@)flex 241override FLEX := $(if $(V),,@)flex
237override GAWK := $(if $(V),,@)gawk 242override GAWK := $(if $(V),,@)gawk
@@ -244,13 +249,14 @@ override INSTALL := $(if $(V),,@)install
244override JAR := $(if $(V),,@)$(JAR) 249override JAR := $(if $(V),,@)$(JAR)
245override JAVA := $(if $(V),,@)$(JAVA) 250override JAVA := $(if $(V),,@)$(JAVA)
246override JAVAC := $(if $(V),,@)$(JAVAC) 251override JAVAC := $(if $(V),,@)$(JAVAC)
247override M4 := $(if $(V),,@)m4 252override LN := $(if $(V),,@)ln -f
253override M4 := $(if $(V),,@)m4
248override MKDIR := $(if $(V),,@)mkdir 254override MKDIR := $(if $(V),,@)mkdir
249override MV := $(if $(V),,@)mv 255override MV := $(if $(V),,@)mv
250override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy 256override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy
251override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm 257override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm
252override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib 258override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib
253override RM := $(if $(V),,@)rm -f 259override RM := $(if $(V),,@)rm -f
254override SED := $(if $(V),,@)sed 260override SED := $(if $(V),,@)sed
255override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip 261override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip
256override TAR := $(if $(V),,@)tar 262override TAR := $(if $(V),,@)tar
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
index d658679..bf3fe11 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
@@ -56,23 +56,40 @@ SYS_CFLAGS := \
56SYS_INCLUDES := \ 56SYS_INCLUDES := \
57 -isystem $(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \ 57 -isystem $(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \
58 -isystem $(ANDROID_ROOT)/bionic/libc/include \ 58 -isystem $(ANDROID_ROOT)/bionic/libc/include \
59 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/common \ 59 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/uapi \
60 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH) \ 60 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/uapi/asm-$(ANDROID_ARCH) \
61 -isystem $(ANDROID_ROOT)/bionic/libm/include \ 61 -isystem $(ANDROID_ROOT)/bionic/libm/include \
62 -isystem $(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \ 62 -isystem $(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \
63 -isystem $(ANDROID_ROOT)/bionic/libthread_db/include \ 63 -isystem $(ANDROID_ROOT)/bionic/libthread_db/include \
64 -isystem $(ANDROID_ROOT)/external/libunwind/include \
64 -isystem $(ANDROID_ROOT)/frameworks/base/include \ 65 -isystem $(ANDROID_ROOT)/frameworks/base/include \
65 -isystem $(ANDROID_ROOT)/system/core/include \
66 -isystem $(ANDROID_ROOT)/hardware/libhardware/include \ 66 -isystem $(ANDROID_ROOT)/hardware/libhardware/include \
67 -isystem $(ANDROID_ROOT)/external/openssl/include \ 67 -isystem $(ANDROID_ROOT)/hardware/libhardware_legacy/include \
68 -isystem $(ANDROID_ROOT)/system/core/include \
69 -isystem $(ANDROID_ROOT)/system/core/libsync/include \
68 -isystem $(ANDROID_ROOT)/system/media/camera/include \ 70 -isystem $(ANDROID_ROOT)/system/media/camera/include \
69 -isystem $(ANDROID_ROOT)/hardware/libhardware_legacy/include 71 -isystem $(ANDROID_ROOT)/external/libdrm \
72 -isystem $(ANDROID_ROOT)/external/libdrm/include/drm
73
74ifneq ($(wildcard $(ANDROID_ROOT)/external/boringssl/src/include),)
75SYS_INCLUDES += \
76 -isystem $(ANDROID_ROOT)/external/boringssl/src/include
77else
78SYS_INCLUDES += \
79 -isystem $(ANDROID_ROOT)/external/openssl/include
80endif
81
82# Obsolete libc includes
83SYS_INCLUDES += \
84 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/common \
85 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH)
70 86
71# This is comparing PVR_BUILD_DIR to see if it is omap and adding 87# This is comparing PVR_BUILD_DIR to see if it is omap and adding
72# includes required for it's HWC 88# includes required for it's HWC
73ifeq ($(notdir $(abspath .)),omap_android) 89ifeq ($(notdir $(abspath .)),omap_android)
74SYS_INCLUDES += \ 90SYS_INCLUDES += \
75 -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/kernel-headers 91 -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/kernel-headers \
92 -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/ion
76endif 93endif
77 94
78ifeq ($(_CLANG),true) 95ifeq ($(_CLANG),true)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
index bb47c8d..b8b97e2 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
@@ -39,8 +39,14 @@
39### ########################################################################### 39### ###########################################################################
40 40
41 41
42$(eval $(call BothConfigC,ANDROID,)) 42# On versions of Android prior to L, remap the use of libc++ to a combination
43# of stlport and libstdc++. Not every module written in C++ in the DDK needs
44# the STL, but linking it should be harmless (and most modules do need it).
45ifneq ($(is_at_least_lollipop),1)
46endif
47
43 48
49$(eval $(call BothConfigC,ANDROID,))
44 50
45 51
46 52
@@ -51,4 +57,15 @@ $(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_ANDROID_SYSTRACE,))
51$(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,)) 57$(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
52$(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,)) 58$(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
53 59
60ifeq ($(NO_HARDWARE),1)
61 override PVR_ANDROID_COMPOSERHAL := null
62endif
63
64ifneq ($(PVR_ANDROID_COMPOSERHAL),drm)
65 ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),1)
66 override PVR_ANDROID_COMPOSERHAL := null
67 endif
68endif
69
70
54include ../common/ion.mk 71include ../common/ion.mk
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
index 7697f13..68e8132 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
@@ -44,6 +44,7 @@ include ../common/android/platform_version.mk
44# 44#
45SUPPORT_ANDROID_PLATFORM := 1 45SUPPORT_ANDROID_PLATFORM := 1
46SUPPORT_OPENGLES1_V1_ONLY := 1 46SUPPORT_OPENGLES1_V1_ONLY := 1
47DONT_USE_SONAMES := 1
47 48
48# Meminfo IDs are required for buffer stamps 49# Meminfo IDs are required for buffer stamps
49# 50#
@@ -51,8 +52,8 @@ SUPPORT_MEMINFO_IDS := 1
51 52
52# Enable services ion support by default 53# Enable services ion support by default
53# 54#
54SUPPORT_ION := 0 55SUPPORT_ION ?= 0
55SUPPORT_DRM_GEM := 1 56SUPPORT_DMABUF := 1
56 57
57# Need multi-process support in PDUMP 58# Need multi-process support in PDUMP
58# 59#
@@ -101,6 +102,14 @@ SUPPORT_LARGE_GENERAL_HEAP := 1
101# 102#
102PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400 103PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400
103 104
105# Unless overridden by the user, assume the RenderScript Compute API level
106# matches that of the SDK API_LEVEL.
107#
108RSC_API_LEVEL ?= $(API_LEVEL)
109ifneq ($(findstring $(RSC_API_LEVEL),21 22),)
110RSC_API_LEVEL := 20
111endif
112
104############################################################################## 113##############################################################################
105# Framebuffer target extension is used to find configs compatible with 114# Framebuffer target extension is used to find configs compatible with
106# the framebuffer (added in JB MR1). 115# the framebuffer (added in JB MR1).
@@ -112,18 +121,10 @@ EGL_EXTENSION_ANDROID_FRAMEBUFFER_TARGET := 1
112# 121#
113UNITTEST_INCLUDES := \ 122UNITTEST_INCLUDES := \
114 eurasiacon/android \ 123 eurasiacon/android \
115 $(ANDROID_ROOT)/frameworks/base/native/include 124 $(ANDROID_ROOT)/frameworks/base/native/include \
116
117ifeq ($(is_at_least_jellybean),1)
118UNITTEST_INCLUDES += \
119 $(ANDROID_ROOT)/frameworks/native/include \ 125 $(ANDROID_ROOT)/frameworks/native/include \
120 $(ANDROID_ROOT)/frameworks/native/opengl/include \ 126 $(ANDROID_ROOT)/frameworks/native/opengl/include \
121 $(ANDROID_ROOT)/libnativehelper/include/nativehelper 127 $(ANDROID_ROOT)/libnativehelper/include/nativehelper
122else
123UNITTEST_INCLUDES += \
124 $(ANDROID_ROOT)/frameworks/base/opengl/include \
125 $(ANDROID_ROOT)/dalvik/libnativehelper/include/nativehelper
126endif
127 128
128# But it doesn't have OpenVG headers 129# But it doesn't have OpenVG headers
129# 130#
@@ -140,12 +141,21 @@ DEMO_DESTDIR := /system/vendor/bin
140EGL_DESTDIR := $(SHLIB_DESTDIR)/egl 141EGL_DESTDIR := $(SHLIB_DESTDIR)/egl
141 142
142############################################################################## 143##############################################################################
143# We can support OpenCL in the build since Froyo (stlport was added in 2.2) 144# In K and older, augment the libstdc++ includes with stlport includes. Any
145# part of the C++ library not implemented by stlport will be handled by
146# linking in libstdc++ too (see extra_config.mk).
147#
148# On L and newer, don't use stlport OR libstdc++ at all; just use libc++.
144# 149#
145SYS_CXXFLAGS := -fuse-cxa-atexit $(SYS_CFLAGS) 150SYS_CXXFLAGS := -fuse-cxa-atexit $(SYS_CFLAGS)
151ifeq ($(is_at_least_lollipop),1)
152SYS_INCLUDES += \
153 -isystem $(ANDROID_ROOT)/external/libcxx/include
154else
146SYS_INCLUDES += \ 155SYS_INCLUDES += \
147 -isystem $(ANDROID_ROOT)/bionic \ 156 -isystem $(ANDROID_ROOT)/bionic \
148 -isystem $(ANDROID_ROOT)/external/stlport/stlport 157 -isystem $(ANDROID_ROOT)/external/stlport/stlport
158endif
149 159
150############################################################################## 160##############################################################################
151# Support the OES_EGL_image_external extensions in the client drivers. 161# Support the OES_EGL_image_external extensions in the client drivers.
@@ -167,122 +177,79 @@ EGL_EXTENSION_ANDROID_RECORDABLE := 1
167EGL_EXTENSION_ANDROID_BLOB_CACHE := 1 177EGL_EXTENSION_ANDROID_BLOB_CACHE := 1
168 178
169############################################################################## 179##############################################################################
170# ICS and earlier should rate-limit composition by waiting for 3D renders
171# to complete in the compositor's eglSwapBuffers().
172#
173ifeq ($(is_at_least_jellybean),0)
174PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
175endif
176
177##############################################################################
178# JB added a new corkscrew API for userland backtracing. 180# JB added a new corkscrew API for userland backtracing.
179# 181#
180ifeq ($(is_at_least_jellybean),1) 182ifeq ($(is_at_least_lollipop),0)
181PVR_ANDROID_HAS_CORKSCREW_API := 1 183PVR_ANDROID_HAS_CORKSCREW_API := 1
182endif 184endif
183 185
184############################################################################## 186##############################################################################
185# JB MR1 makes the framebuffer HAL obsolete.
186#
187# We also need to support IMPLEMENTATION_DEFINED so gralloc allocates
188# framebuffers and GPU buffers in a 'preferred' format.
189#
190ifeq ($(is_at_least_jellybean_mr1),0)
191SUPPORT_ANDROID_FRAMEBUFFER_HAL := 1
192else
193PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED := 1
194endif
195
196##############################################################################
197# JB MR1 introduces cross-process syncs associated with a fd. 187# JB MR1 introduces cross-process syncs associated with a fd.
198# This requires a new enough kernel version to have the base/sync driver. 188# This requires a new enough kernel version to have the base/sync driver.
199# 189#
200ifeq ($(is_at_least_jellybean_mr1),1) 190EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC ?= 1
201EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC := 0 191PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC ?= 1
202PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC := 0
203endif
204 192
205############################################################################## 193##############################################################################
206# JB MR1 introduces new usage bits for the camera HAL and some new formats. 194# Versions of Android between Cupcake and KitKat MR1 required Java 6.
207# 195#
208ifeq ($(is_at_least_jellybean_mr1),1) 196ifeq ($(is_at_least_lollipop),0)
209PVR_ANDROID_HAS_GRALLOC_USAGE_HW_CAMERA := 1 197LEGACY_USE_JAVA6 ?= 1
210PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_RAW_SENSOR := 1
211PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_BLOB := 1
212endif 198endif
213 199
214############################################################################## 200##############################################################################
215# JB MR2 adds a new graphics HAL (gralloc) API function, lock_ycbcr(), and 201# Versions of Android between ICS and KitKat MR1 used ion .heap_mask instead
216# a so-called "flexible" YUV format enum. 202# of .heap_id_mask.
217# 203#
218ifeq ($(is_at_least_jellybean_mr2),1) 204ifeq ($(is_at_least_lollipop),0)
219PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YCbCr_420_888 := 1 205PVR_ANDROID_HAS_ION_FIELD_HEAP_MASK := 1
220PVR_ANDROID_GRALLOC_HAS_0_2_FEATURES := 1
221endif 206endif
222 207
223############################################################################## 208##############################################################################
224# In JB MR2 we can use a native helper library for the unittest wrapper. 209# Lollipop supports 64-bit. Configure BCC to emit both 32-bit and 64-bit LLVM
225# In earlier versions, we must use a less ideal approach. 210# bitcode in the renderscript driver.
226#
227ifeq ($(is_at_least_jellybean_mr2),0)
228PVR_ANDROID_SURFACE_FIELD_NAME := \"mNativeSurface\"
229endif
230
231##############################################################################
232# JB MR2 introduces two new camera HAL formats (Y8, Y16)
233#
234ifeq ($(is_at_least_jellybean_mr2),1)
235PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y8 := 1
236PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y16 := 1
237endif
238
239##############################################################################
240# KK's EGL wrapper remaps EGLConfigs in the BGRA and BGRX formats to RGBA and
241# RGBX respectively, for CpuConsumer compatibility. It does this because the
242# usage bits for the gralloc allocation are not available to EGL.
243#
244# In this newer platform version, gralloc has been redefined to allow the
245# 'format' parameter to gralloc->alloc() to be ignored for non-USAGE_SW
246# allocations, so long as the bits per channel and sRGB-ness are preserved.
247# 211#
248ifeq ($(is_at_least_kitkat),1) 212ifeq ($(is_at_least_lollipop),1)
249PVR_ANDROID_REMAP_HW_ONLY_PIXEL_FORMATS := 1 213PVR_ANDROID_BCC_MULTIARCH_SUPPORT := 1
250endif 214endif
251 215
252############################################################################## 216##############################################################################
253# Support newer HWC features in KK 217# Lollipop annotates the cursor allocation with USAGE_CURSOR to enable it to
218# be accelerated with special cursor hardware (rather than wasting an
219# overlay). This flag stops the DDK from blocking the allocation.
254# 220#
255ifeq ($(is_at_least_kitkat),1) 221ifeq ($(is_at_least_lollipop),1)
256PVR_ANDROID_HWC_HAS_1_3_FEATURES := 1 222PVR_ANDROID_HAS_GRALLOC_USAGE_CURSOR := 1
257endif 223endif
258 224
259############################################################################## 225##############################################################################
260# KK eliminated egl.cfg. Only create for older versions. 226# Lollipop changed the camera HAL metadata specification to require that
227# CONTROL_MAX_REGIONS specifies 3 integers (instead of 1).
261# 228#
262ifeq ($(is_at_least_kitkat),0) 229ifeq ($(is_at_least_lollipop),1)
263PVR_ANDROID_HAS_EGL_CFG := 1 230PVR_ANDROID_CAMERA_CONTROL_MAX_REGIONS_HAS_THREE := 1
264endif 231endif
265 232
266############################################################################## 233##############################################################################
267# KK has a bug in its browser that we need to work around. 234# Marshmallow needs --soname turned on
268# 235#
269ifeq ($(is_at_least_kitkat),1) 236ifeq ($(is_at_least_marshmallow),1)
270PVR_ANDROID_RELAX_GRALLOC_MODULE_MAP_CHECKS := 1 237PVR_ANDROID_NEEDS_SONAME ?= 1
271endif 238endif
272 239
273############################################################################## 240##############################################################################
274# KK's Camera HAL requires that ACTIVE_ARRAY_SIZE specify xmin/ymin first 241# Marshmallow replaces RAW_SENSOR with RAW10, RAW12 and RAW16
275# 242#
276ifeq ($(is_at_least_kitkat),1) 243ifeq ($(is_at_least_marshmallow),1)
277PVR_ANDROID_CAMERA_ACTIVE_ARRAY_SIZE_HAS_XMIN_YMIN := 1 244PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_RAWxx := 1
278endif 245endif
279 246
280############################################################################## 247##############################################################################
281# KitKat added a new memory tracking HAL. This enables gralloc support for 248# Marshmallow onwards DDK stopped render script accleration using GPU.
282# the GRAPHICS/GL memtrack types. 249# This flag stops device alloction.
283# 250#
284ifeq ($(is_at_least_kitkat),1) 251ifeq ($(is_at_least_marshmallow),1)
285SUPPORT_ANDROID_MEMTRACK_HAL := 1 252PVR_ANDROID_HAS_GRALLOC_USAGE_RENDERSCRIPT := 1
286endif 253endif
287 254
288# Placeholder for future version handling 255# Placeholder for future version handling
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk
index 9717ca9..4309c72 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk
@@ -54,4 +54,4 @@ endif
54TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/obj 54TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/obj
55TOOLCHAIN2 ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system 55TOOLCHAIN2 ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system
56 56
57LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name) 57LIBGCC := $(shell $(CROSS_COMPILE)gcc -m32 -print-libgcc-file-name 2>/dev/null)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
index bf43dda..f2a5600 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
@@ -38,95 +38,117 @@
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ########################################################################### 39### ###########################################################################
40 40
41# Figure out the version of Android we're building against. 41# If there's no build.prop file in the expected location, bail out. Tell the
42# user which file we were trying to read in case TARGET_DEVICE was not set.
42# 43#
43PLATFORM_VERSION := $(shell \ 44BUILD_PROP := $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop
44 if [ -f $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop ]; then \ 45ifeq ($(wildcard $(BUILD_PROP)),)
45 cat $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop | \ 46$(warning *** Could not determine Android version. Did you set ANDROID_ROOT,\
46 grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \ 47OUT_DIR and TARGET_DEVICE in your environment correctly?)
47 else \ 48$(error Error reading $(BUILD_PROP))
48 echo 5.0; \ 49endif
49 fi) 50
51# Extract version.release and version.codename from the build.prop file.
52# If either of the values aren't in the build.prop, the Make variables won't
53# be defined, and fallback handling will take place.
54#
55define newline
56
57
58endef
59$(eval $(subst #,$(newline),$(shell cat $(BUILD_PROP) | \
60 grep '^ro.build.version.release=\|^ro.build.version.codename=' | \
61 sed -e 's,ro.build.version.release=,PLATFORM_RELEASE=,' \
62 -e 's,ro.build.version.codename=,PLATFORM_CODENAME=,' | tr '\n' '#')))
50 63
51define version-starts-with 64define release-starts-with
52$(shell echo $(PLATFORM_VERSION) | grep -q ^$(1); \ 65$(shell echo $(PLATFORM_RELEASE) | grep -q ^$(1); \
53 [ "$$?" = "0" ] && echo 1 || echo 0) 66 [ "$$?" = "0" ] && echo 1 || echo 0)
54endef 67endef
55 68
56# ro.build.version.release contains the version number for release builds, or 69# ro.build.version.release contains the version number for release builds, or
57# the version codename otherwise. In this case we need to assume that the 70# the version codename otherwise. In this case we need to assume that the
58# version of Android we're building against has the features that are in the 71# version of Android we're building against has the features that are in the
59# final release of that version, so we set PLATFORM_VERSION to the 72# final release of that version, so we set PLATFORM_RELEASE to the
60# corresponding release number. 73# corresponding release number.
61# 74#
62# NOTE: It's the _string_ ordering that matters here, not the version number 75# NOTE: It's the _string_ ordering that matters here, not the version number
63# ordering. You need to make sure that strings that are sub-strings of other 76# ordering. You need to make sure that strings that are sub-strings of other
64# checked strings appear _later_ in this list. 77# checked strings appear _later_ in this list.
65# 78#
66# e.g. 'JellyBeanMR' starts with 'JellyBean', but it is not JellyBean. 79# e.g. 'KitKatMR' starts with 'KitKat', but it is not KitKat.
80#
81# NOTE: The version codenames for Android stopped after KitKat, don't read
82# too much into the below names. They are mostly placeholders/reminders.
83#
84ifeq ($(call release-starts-with,KitKatMR),1)
85PLATFORM_RELEASE := 4.4.1
86else ifeq ($(call release-starts-with,KitKat),1)
87PLATFORM_RELEASE := 4.4
88else ifeq ($(call release-starts-with,LollipopMR1),1)
89PLATFORM_RELEASE := 5.1
90else ifeq ($(call release-starts-with,Lollipop),1)
91PLATFORM_RELEASE := 5.0
92else ifeq ($(call release-starts-with,Marshmallow),1)
93PLATFORM_RELEASE := 6.0
94else ifeq ($(PLATFORM_CODENAME),AOSP)
95# AOSP (master) will normally have PLATFORM_CODENAME set to AOSP
96PLATFORM_RELEASE := 6.0.60
97else ifeq ($(shell echo $(PLATFORM_RELEASE) | grep -qE "[A-Za-z]+"; echo $$?),0)
98PLATFORM_RELEASE := 6.1
99endif
100
101# Workaround for master. Sometimes there is an AOSP version ahead of
102# the current master version number, but master still has more features.
67# 103#
68ifeq ($(call version-starts-with,JellyBeanMR1),1) 104ifeq ($(PLATFORM_RELEASE),6.0.60)
69PLATFORM_VERSION := 4.2 105PLATFORM_RELEASE := 6.1
70else ifeq ($(call version-starts-with,JellyBeanMR),1) 106is_aosp_master := 1
71PLATFORM_VERSION := 4.3
72else ifeq ($(call version-starts-with,JellyBean),1)
73PLATFORM_VERSION := 4.1
74else ifeq ($(call version-starts-with,KeyLimePie),1)
75PLATFORM_VERSION := 4.4
76else ifeq ($(call version-starts-with,KitKat),1)
77PLATFORM_VERSION := 4.4
78else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0)
79PLATFORM_VERSION := 5.0
80endif 107endif
81 108
82PLATFORM_VERSION_MAJ := $(shell echo $(PLATFORM_VERSION) | cut -f1 -d'.') 109PLATFORM_RELEASE_MAJ := $(shell echo $(PLATFORM_RELEASE) | cut -f1 -d'.')
83PLATFORM_VERSION_MIN := $(shell echo $(PLATFORM_VERSION) | cut -f2 -d'.') 110PLATFORM_RELEASE_MIN := $(shell echo $(PLATFORM_RELEASE) | cut -f2 -d'.')
84PLATFORM_VERSION_PATCH := $(shell echo $(PLATFORM_VERSION) | cut -f3 -d'.') 111PLATFORM_RELEASE_PATCH := $(shell echo $(PLATFORM_RELEASE) | cut -f3 -d'.')
85 112
86# Not all versions have a patchlevel; fix that up here 113# Not all versions have a patchlevel; fix that up here
87# 114#
88ifeq ($(PLATFORM_VERSION_PATCH),) 115ifeq ($(PLATFORM_RELEASE_PATCH),)
89PLATFORM_VERSION_PATCH := 0 116PLATFORM_RELEASE_PATCH := 0
90endif 117endif
91 118
92# Macros to help categorize support for features and API_LEVEL for tests. 119# Macros to help categorize support for features and API_LEVEL for tests.
93# 120#
94is_at_least_jellybean := \ 121is_at_least_lollipop := \
95 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \ 122 $(shell ( test $(PLATFORM_RELEASE_MAJ) -ge 5 ) && echo 1 || echo 0)
96 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \ 123is_at_least_lollipop_mr1 := \
97 test $(PLATFORM_VERSION_MIN) -ge 1 ) ) && echo 1 || echo 0) 124 $(shell ( test $(PLATFORM_RELEASE_MAJ) -gt 5 || \
98is_at_least_jellybean_mr1 := \ 125 ( test $(PLATFORM_RELEASE_MAJ) -eq 5 && \
99 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \ 126 test $(PLATFORM_RELEASE_MIN) -gt 0 ) ) && echo 1 || echo 0)
100 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \ 127is_at_least_marshmallow := \
101 test $(PLATFORM_VERSION_MIN) -ge 2 ) ) && echo 1 || echo 0) 128 $(shell ( test $(PLATFORM_RELEASE_MAJ) -ge 6 ) && echo 1 || echo 0)
102is_at_least_jellybean_mr2 := \
103 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
104 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
105 test $(PLATFORM_VERSION_MIN) -ge 3 ) ) && echo 1 || echo 0)
106is_at_least_kitkat := \
107 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
108 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
109 test $(PLATFORM_VERSION_MIN) -ge 4 ) ) && echo 1 || echo 0)
110 129
111# FIXME: Assume "future versions" are >=5.0, but we don't really know 130# Assume "future versions" are >6.0, but we don't really know
112is_future_version := \ 131is_future_version := \
113 $(shell ( test $(PLATFORM_VERSION_MAJ) -ge 5 ) && echo 1 || echo 0) 132 $(shell ( test $(PLATFORM_RELEASE_MAJ) -gt 6 || \
133 ( test $(PLATFORM_RELEASE_MAJ) -eq 6 && \
134 test $(PLATFORM_RELEASE_MIN) -gt 0 ) ) && echo 1 || echo 0)
114 135
115# Picking an exact match of API_LEVEL for the platform we're building 136# Picking an exact match of API_LEVEL for the platform we're building
116# against can avoid compatibility theming and affords better integration. 137# against can avoid compatibility theming and affords better integration.
117# 138#
118ifeq ($(is_future_version),1) 139ifeq ($(is_future_version),1)
119API_LEVEL := 20 140API_LEVEL := 23
141else ifeq ($(is_at_least_marshmallow),1)
142API_LEVEL := 23
143else ifeq ($(is_at_least_lollipop_mr1),1)
144API_LEVEL := 22
145else ifeq ($(is_at_least_lollipop),1)
146API_LEVEL := 21
147#API_LEVEL := 20 was l-preview
120else ifeq ($(is_at_least_kitkat),1) 148else ifeq ($(is_at_least_kitkat),1)
121API_LEVEL := 19 149API_LEVEL := 19
122else ifeq ($(is_at_least_jellybean_mr2),1)
123API_LEVEL := 18
124else ifeq ($(is_at_least_jellybean_mr1),1)
125API_LEVEL := 17
126else ifeq ($(is_at_least_jellybean),1)
127API_LEVEL := 16
128else 150else
129$(error Must build against Android >= 4.1) 151$(error Must build against Android >= 4.4)
130endif 152endif
131 153
132# Each DDK is tested against only a single version of the platform. 154# Each DDK is tested against only a single version of the platform.
@@ -134,6 +156,6 @@ endif
134# 156#
135ifeq ($(is_future_version),1) 157ifeq ($(is_future_version),1)
136$(info WARNING: Android version is newer than this DDK supports) 158$(info WARNING: Android version is newer than this DDK supports)
137else ifneq ($(is_at_least_jellybean_mr2),1) 159else ifneq ($(is_at_least_lollipop_mr1),1)
138$(info WARNING: Android version is older than this DDK supports) 160$(info WARNING: Android version is older than this DDK supports)
139endif 161endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk
index c779e9d..cdcabd9 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk
@@ -39,9 +39,17 @@
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ########################################################################### 40### ###########################################################################
41 41
42ifeq ($(filter xorg,$(EXCLUDED_APIS)),) 42ifeq ($(WINDOW_SYSTEM),xorg)
43 COMPONENTS += xorg pvr_conf pvr_video wsegl_dri2_linux 43 SUPPORT_BUILD_LWS := 1
44 -include ../common/apis/xorg_opengl.mk 44 COMPONENTS += libudev_stubs
45 ifeq ($(PVR_LWS_NODC),1)
46 COMPONENTS += xorg pvr_conf pvr_video lws_pkgconfig pvr_dri
47 else
48 COMPONENTS += xorg pvr_conf pvr_video wsegl_dri2_linux
49 ifeq ($(filter opengl,$(EXCLUDED_APIS)),)
50 COMPONENTS += pvr_dri
51 endif
52 endif
45ifeq ($(SUPPORT_PVR_REMOTE),1) 53ifeq ($(SUPPORT_PVR_REMOTE),1)
46 COMPONENTS += pvr_input 54 COMPONENTS += pvr_input
47endif 55endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk
index 4097e7a..b6f945f 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk
@@ -59,3 +59,20 @@ $(eval $(call TunableBothConfigMake,PVR_DRI_DRM_NOT_PCI))
59 59
60$(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,)) 60$(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,))
61 61
62
63
64ifeq ($(SUPPORT_DRI_DRM_PLUGIN),1)
65PVR_DRI_CLIENT_DRIVER := pvrsrvkm
66else
67# The X and Wayland window systems derive the client driver name from a
68# display driver DRM device node. The Surfaceless window system derives it
69# from a render node.
70ifeq ($(WINDOW_SYSTEM),surfaceless)
71PVR_DRI_CLIENT_DRIVER := pvr
72else
73PVR_DRI_CLIENT_DRIVER := $(if $(PVR_DRM_MODESET_DRIVER_NAME),$(PVR_DRM_MODESET_DRIVER_NAME),pvr)
74endif
75endif
76
77PVR_DRI_GET_EXTENSIONS_ENTRY_POINT := __driDriverGetExtensions_$(PVR_DRI_CLIENT_DRIVER)
78
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk
index 27c77a3..6867263 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk
@@ -38,11 +38,17 @@
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ########################################################################### 39### ###########################################################################
40 40
41PVR_SECURE_DRM_AUTH_EXPORT := 1 41ifeq ($(PVR_DRM_MODESET_DRIVER_NAME),)
42 PVR_SECURE_DRM_AUTH_EXPORT := 1
43endif
42 44
43$(eval $(call TunableKernelConfigC,XPROC_WORKAROUND_NUM_SHAREABLES,4095)) 45$(eval $(call TunableKernelConfigC,XPROC_WORKAROUND_NUM_SHAREABLES,4095))
44 46
45ifeq ($(SUPPORT_PVR_REMOTE),1) 47ifeq ($(SUPPORT_PVR_REMOTE),1)
46else 48else
49 ifeq ($(PVR_LWS_NODC),1)
50 else
51 endif
47endif 52endif
48 53
54
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk
index fe10742..ea112e7 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk
@@ -38,14 +38,21 @@
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ########################################################################### 39### ###########################################################################
40 40
41# FIXME: Will go away when SUPPORT_DRI_DRM is untangled from 41ifeq ($(WINDOW_SYSTEM),)
42# the old meaning of SUPPORT_XORG=1. 42 ifeq ($(filter xorg,$(EXCLUDED_APIS)),)
43 43 ifneq ($(wildcard ../common/apis/xorg.mk),)
44ifeq ($(filter xorg,$(EXCLUDED_APIS)),) 44 WINDOW_SYSTEM := xorg
45ifneq ($(wildcard ../common/apis/xorg.mk),) 45 WINDOW_SYSTEM_SET_INTERNALLY := 1
46SUPPORT_BUILD_XORG := 1 46 endif
47ifeq ($(PDUMP),1) 47 endif
48SUPPORT_PDUMP_MULTI_PROCESS := 1
49endif
50endif 48endif
49
50ifeq ($(WINDOW_SYSTEM),xorg)
51 # Set for the benefit of those platform Makefiles that test for it,
52 # but no longer used by the build system.
53 SUPPORT_BUILD_XORG := 1
54
55 ifeq ($(PDUMP),1)
56 SUPPORT_PDUMP_MULTI_PROCESS := 1
57 endif
51endif 58endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
index 1bfce01..5cd7a47 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
@@ -178,7 +178,11 @@ $(call directory-must-exist,$(TOP)/eurasiacon/build/linux2/$(PVR_BUILD_DIR))
178# final programs/libraries, and install/rc scripts. 178# final programs/libraries, and install/rc scripts.
179# 179#
180BUILD ?= release 180BUILD ?= release
181OUT ?= $(TOP)/eurasiacon/binary2_$(PVR_BUILD_DIR)_$(BUILD) 181ifneq ($(WINDOW_SYSTEM),)
182OUT ?= $(TOP)/eurasiacon/binary_$(PVR_BUILD_DIR)_$(WINDOW_SYSTEM)_$(BUILD)
183else
184OUT ?= $(TOP)/eurasiacon/binary2_$(PVR_BUILD_DIR)_$(BUILD)
185endif
182override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT)) 186override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT))
183 187
184CONFIG_MK := $(OUT)/config.mk 188CONFIG_MK := $(OUT)/config.mk
@@ -269,7 +273,9 @@ ifeq ($(SUPPORT_LINUX_USING_WORKQUEUES),1)
269override PVR_LINUX_USING_WORKQUEUES := 1 273override PVR_LINUX_USING_WORKQUEUES := 1
270override PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE := 1 274override PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE := 1
271override PVR_LINUX_TIMERS_USING_WORKQUEUES := 1 275override PVR_LINUX_TIMERS_USING_WORKQUEUES := 1
276ifneq ($(SUPPORT_ANDROID_FPGA),1)
272override SYS_CUSTOM_POWERLOCK_WRAP := 1 277override SYS_CUSTOM_POWERLOCK_WRAP := 1
278endif
273else ifeq ($(SUPPORT_LINUX_USING_SHARED_WORKQUEUES),1) 279else ifeq ($(SUPPORT_LINUX_USING_SHARED_WORKQUEUES),1)
274override PVR_LINUX_USING_WORKQUEUES := 1 280override PVR_LINUX_USING_WORKQUEUES := 1
275override PVR_LINUX_MISR_USING_WORKQUEUE := 1 281override PVR_LINUX_MISR_USING_WORKQUEUE := 1
@@ -360,7 +366,7 @@ $$(warning *** Setting $(1) via $$(origin $(1)) is deprecated)
360$$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl") 366$$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl")
361endif 367endif
362endef 368endef
363$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_INCLUDES SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SYS_EXE_LDFLAGS_CXX SYS_LIB_LDFLAGS_CXX SUPPORT_EWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENCL SUPPORT_RSCOMPUTE SUPPORT_OPENGL SUPPORT_UNITTESTS SUPPORT_XORG,$(eval $(call sanity-check-support-option-origin,$(_o)))) 369$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_INCLUDES SYS_COMMON_LDFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SYS_EXE_LDFLAGS_CXX SYS_LIB_LDFLAGS_CXX SUPPORT_EWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENCL SUPPORT_RSCOMPUTE SUPPORT_OPENGL SUPPORT_UNITTESTS SUPPORT_XORG,$(eval $(call sanity-check-support-option-origin,$(_o))))
364 370
365# Check for words in EXCLUDED_APIS that aren't understood by the 371# Check for words in EXCLUDED_APIS that aren't understood by the
366# common/apis/*.mk files. This should be kept in sync with all the tests on 372# common/apis/*.mk files. This should be kept in sync with all the tests on
@@ -401,6 +407,31 @@ COMPONENTS += pvrvncsrv
401COMPONENTS += pvrvncinput 407COMPONENTS += pvrvncinput
402endif 408endif
403 409
410ifeq ($(HAVE_WINDOW_SYSTEM_MAKEFILE),)
411 ifeq ($(WINDOW_SYSTEM_SET_INTERNALLY),)
412 ifneq ($(WINDOW_SYSTEM),)
413 $(error "The WINDOW_SYSTEM build variable is not supported on this platform")
414 endif
415 endif
416 ifneq ($(MESA_EGL),)
417 $(error "The MESA_EGL build variable is not supported on this platform")
418 endif
419 PVR_LWS_NODC :=
420 PVR_LWS_NOBC :=
421endif
422
423ifneq ($(WINDOW_SYSTEM),)
424endif
425ifeq ($(MESA_EGL),1)
426 SUPPORT_OPENGLES1_V1_ONLY := 1
427 GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1
428 GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1
429else
430 ifeq ($(SUPPORT_BUILD_LWS),1)
431 else
432 endif
433endif
434
404$(if $(filter config,$(D)),$(info Build configuration:)) 435$(if $(filter config,$(D)),$(info Build configuration:))
405 436
406################################# CONFIG #################################### 437################################# CONFIG ####################################
@@ -426,7 +457,7 @@ $(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,))
426endif 457endif
427 458
428# Check the KERNELDIR has a kernel built. 459# Check the KERNELDIR has a kernel built.
429VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux)) 460VMLINUX :=
430LINUXCFG := $(strip $(wildcard $(KERNELDIR)/.config)) 461LINUXCFG := $(strip $(wildcard $(KERNELDIR)/.config))
431 462
432ifneq ($(VMLINUX),) 463ifneq ($(VMLINUX),)
@@ -437,8 +468,10 @@ VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep 64-bit >/dev/null || echo fal
437VMLINUX_HAS_PAE36 := $(shell cat $(LINUXCFG) | grep CONFIG_X86_PAE=y >/dev/null || echo false) 468VMLINUX_HAS_PAE36 := $(shell cat $(LINUXCFG) | grep CONFIG_X86_PAE=y >/dev/null || echo false)
438VMLINUX_HAS_PAE40 := $(shell cat $(LINUXCFG) | grep CONFIG_ARM_LPAE=y >/dev/null || echo false) 469VMLINUX_HAS_PAE40 := $(shell cat $(LINUXCFG) | grep CONFIG_ARM_LPAE=y >/dev/null || echo false)
439VMLINUX_HAS_DMA32 := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA32=y >/dev/null || echo false) 470VMLINUX_HAS_DMA32 := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA32=y >/dev/null || echo false)
471VMLINUX_HAS_DMA := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA=y >/dev/null || echo false)
440 472
441# $(error 64BIT=$(VMLINUX_IS_64BIT) PAE36=$(VMLINUX_HAS_PAE36) PAE40=$(VMLINUX_HAS_PAE40) DMA32=$(VMLINUX_HAS_DMA32) MMU36=$(SGX_FEATURE_36BIT_MMU)) 473
474# $(error 64BIT=$(VMLINUX_IS_64BIT) PAE36=$(VMLINUX_HAS_PAE36) PAE40=$(VMLINUX_HAS_PAE40) DMA=$(VMLINUX_HAS_DMA) DMA32=$(VMLINUX_HAS_DMA32) MMU36=$(SGX_FEATURE_36BIT_MMU))
442 475
443ifneq ($(VMLINUX_IS_64BIT),false) 476ifneq ($(VMLINUX_IS_64BIT),false)
444$(warning $$(KERNELDIR)/vmlinux: Note: vmlinux is 64-bit, which is supported but currently experimental.) 477$(warning $$(KERNELDIR)/vmlinux: Note: vmlinux is 64-bit, which is supported but currently experimental.)
@@ -449,8 +482,8 @@ endif
449endif 482endif
450 483
451ifneq ($(VMLINUX_HAS_PAE40),false) 484ifneq ($(VMLINUX_HAS_PAE40),false)
452ifeq ($(VMLINUX_HAS_DMA32),false) 485ifeq ($(VMLINUX_HAS_DMA),false)
453$(warning SGX MMUs are currently supported up to only 36 bits max. Your Kernel is built with 40-bit PAE but does not have CONFIG_ZONE_DMA32.) 486$(warning SGX MMUs are currently supported up to only 36 bits max. Your Kernel is built with 40-bit PAE but does not have CONFIG_ZONE_DMA.)
454$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) 487$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...)
455endif 488endif
456endif 489endif
@@ -465,8 +498,8 @@ endif
465else 498else
466 # Kernel is 32-bit 499 # Kernel is 32-bit
467ifneq ($(VMLINUX_HAS_PAE36),false) 500ifneq ($(VMLINUX_HAS_PAE36),false)
468ifeq ($(VMLINUX_HAS_DMA32),false) 501ifeq ($(VMLINUX_HAS_DMA),false)
469$(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA32. ) 502$(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA. )
470$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) 503$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...)
471endif 504endif
472endif 505endif
@@ -506,13 +539,16 @@ ifneq ($(DISPLAY_CONTROLLER),)
506$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) 539$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER)))
507endif 540endif
508 541
542ifneq ($(DRM_DISPLAY_CONTROLLER),)
543endif
544
509ifneq ($(strip $(KERNELDIR)),) 545ifneq ($(strip $(KERNELDIR)),)
510PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0 546PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0
511ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0) 547ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0)
512PVR_LINUX_MEM_AREA_USE_VMAP ?= 1 548PVR_LINUX_MEM_AREA_USE_VMAP ?= 1
513include ../kernel_version.mk 549include ../kernel_version.mk
514ifeq ($(call kernel-version-at-least,3,0),true) 550ifeq ($(call kernel-version-at-least,3,0),true)
515PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 0 551PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 1
516endif 552endif
517endif 553endif
518$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES))) 554$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES)))
@@ -537,6 +573,7 @@ $(eval $(call KernelConfigC,DEBUG_BRIDGE_KM,))
537else ifeq ($(BUILD),release) 573else ifeq ($(BUILD),release)
538$(eval $(call BothConfigC,RELEASE,)) 574$(eval $(call BothConfigC,RELEASE,))
539$(eval $(call TunableBothConfigMake,DEBUGLINK,1)) 575$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
576$(eval $(call TunableBothConfigC,PVR_DBGPRIV_LEVEL,))
540else ifeq ($(BUILD),timing) 577else ifeq ($(BUILD),timing)
541$(eval $(call BothConfigC,TIMING,)) 578$(eval $(call BothConfigC,TIMING,))
542$(eval $(call TunableBothConfigMake,DEBUGLINK,1)) 579$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
@@ -566,6 +603,7 @@ $(eval $(call TunableBothConfigC,SGX_FEATURE_MP_PLUS,))
566$(eval $(call TunableBothConfigC,FPGA,)) 603$(eval $(call TunableBothConfigC,FPGA,))
567$(eval $(call TunableBothConfigC,PDUMP,)) 604$(eval $(call TunableBothConfigC,PDUMP,))
568$(eval $(call TunableBothConfigC,MEM_TRACK_INFO_DEBUG,)) 605$(eval $(call TunableBothConfigC,MEM_TRACK_INFO_DEBUG,))
606$(eval $(call TunableBothConfigC,PVRSRV_DEVMEM_TIME_STATS,))
569$(eval $(call TunableBothConfigC,NO_HARDWARE,)) 607$(eval $(call TunableBothConfigC,NO_HARDWARE,))
570$(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,)) 608$(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,))
571$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,)) 609$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,))
@@ -578,7 +616,7 @@ $(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_ASSERT,))
578$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_TRACE,)) 616$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_TRACE,))
579$(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,)) 617$(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,))
580$(eval $(call TunableBothConfigC,SUPPORT_ION,)) 618$(eval $(call TunableBothConfigC,SUPPORT_ION,))
581$(eval $(call TunableBothConfigC,SUPPORT_DRM_GEM,)) 619$(eval $(call TunableBothConfigC,SUPPORT_DMABUF,))
582$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,)) 620$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,))
583$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_DEVICE_CLASS,)) 621$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_DEVICE_CLASS,))
584$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1)) 622$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1))
@@ -599,6 +637,7 @@ $(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE,))
599$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_WORKQUEUES,)) 637$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_WORKQUEUES,))
600$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE,)) 638$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE,))
601$(eval $(call TunableKernelConfigC,LDM_PLATFORM,)) 639$(eval $(call TunableKernelConfigC,LDM_PLATFORM,))
640$(eval $(call TunableKernelConfigC,PVR_LDM_DEVICE_TREE,))
602$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED,)) 641$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED,))
603$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED_DEV,)) 642$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED_DEV,))
604$(eval $(call TunableKernelConfigC,PVR_LDM_DRIVER_REGISTRATION_NAME,"\"$(PVRSRV_MODNAME)\"")) 643$(eval $(call TunableKernelConfigC,PVR_LDM_DRIVER_REGISTRATION_NAME,"\"$(PVRSRV_MODNAME)\""))
@@ -620,7 +659,7 @@ $(eval $(call TunableKernelConfigC,SUPPORT_FORCE_SYNC_DUMP,))
620 659
621$(eval $(call TunableBothConfigMake,OPTIM,)) 660$(eval $(call TunableBothConfigMake,OPTIM,))
622$(eval $(call TunableBothConfigMake,SUPPORT_ION,)) 661$(eval $(call TunableBothConfigMake,SUPPORT_ION,))
623$(eval $(call TunableBothConfigMake,SUPPORT_DRM_GEM,)) 662$(eval $(call TunableBothConfigMake,SUPPORT_DMABUF,))
624$(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_DEVICE_CLASS,)) 663$(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_DEVICE_CLASS,))
625 664
626 665
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
index dee740f..311bbb0 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
@@ -146,3 +146,8 @@ endef
146define module-info-line 146define module-info-line
147$(if $(filter modules,$(D)),$(info $(1)),) 147$(if $(filter modules,$(D)),$(info $(1)),)
148endef 148endef
149
150# $(call if-exists,A,B) => A if A is a file which exists, otherwise B
151define if-exists
152$(if $(wildcard $(1)),$(1),$(2))
153endef
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
index ef4596c..155d3bb 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
@@ -61,12 +61,12 @@ endif
61 61
62# Only allow cflags that do not affect code generation. This is to ensure 62# Only allow cflags that do not affect code generation. This is to ensure
63# proper binary compatibility when LTO (Link-Time Optimization) is enabled. 63# proper binary compatibility when LTO (Link-Time Optimization) is enabled.
64# We make exceptions for -fPIC, -fPIE and -m32 which will all fail linkage 64# We make exceptions for the below flags which will all fail linkage in
65# in non-LTO mode if incorrectly specified. 65# non-LTO mode if incorrectly specified.
66# 66#
67# NOTE: Only used by static_library and objects right now. Other module 67# NOTE: Only used by static_library and objects right now. Other module
68# types should not be affected by complex code generation flags w/ LTO. 68# types should not be affected by complex code generation flags w/ LTO.
69MODULE_ALLOWED_CFLAGS := -W% -D% -std=% -fPIC -fPIE -m32 69MODULE_ALLOWED_CFLAGS := -W% -D% -std=% -fPIC -fPIE -pie -m32
70 70
71# -L flags for library search dirs: these are relative to $(TOP), unless 71# -L flags for library search dirs: these are relative to $(TOP), unless
72# they're absolute paths 72# they're absolute paths
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk
index 1576590..971f21a 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk
@@ -42,7 +42,6 @@
42# Bits for processing $(modules) after reading in each Linux.mk 42# Bits for processing $(modules) after reading in each Linux.mk
43 43
44#$(info ---- $(modules) ----) 44#$(info ---- $(modules) ----)
45$(call must-be-nonempty,modules)
46 45
47$(foreach _m,$(modules),$(if $(filter $(_m),$(ALL_MODULES)),$(error In makefile $(THIS_MAKEFILE): Duplicate module $(_m) (first seen in $(INTERNAL_MAKEFILE_FOR_MODULE_$(_m))) listed in $$(modules)),$(eval $(call register-module,$(_m))))) 46$(foreach _m,$(modules),$(if $(filter $(_m),$(ALL_MODULES)),$(error In makefile $(THIS_MAKEFILE): Duplicate module $(_m) (first seen in $(INTERNAL_MAKEFILE_FOR_MODULE_$(_m))) listed in $$(modules)),$(eval $(call register-module,$(_m)))))
48 47
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile
index 109e405..03efcdb 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile
@@ -63,7 +63,21 @@ SGXCORE := 544
63SGX_CORE_REV := 112 63SGX_CORE_REV := 112
64HAL_VARIANT := omap4 64HAL_VARIANT := omap4
65endif 65endif
66ifneq ($(filter jacinto6evm omap5sevm panda5,$(TARGET_DEVICE)),) 66ifneq ($(filter omap5sevm panda5,$(TARGET_DEVICE)),)
67SGXCORE := 544
68SGX_CORE_REV := 105
69SGX_FEATURE_MP := 1
70SGX_FEATURE_SYSTEM_CACHE := 1
71SGX_FEATURE_MP_CORE_COUNT := 2
72HAL_VARIANT := omap5
73
74# OMAP Product Version
75VS_PRODUCT_VERSION := 5
76
77# FIXME: Re-enable this ASAP
78SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
79endif
80ifneq ($(filter jacinto6evm,$(TARGET_DEVICE)),)
67SGXCORE := 544 81SGXCORE := 544
68SGX_CORE_REV := 116 82SGX_CORE_REV := 116
69SGX_FEATURE_MP := 1 83SGX_FEATURE_MP := 1
@@ -72,10 +86,12 @@ SGX_FEATURE_MP_CORE_COUNT := 2
72HAL_VARIANT := jacinto6 86HAL_VARIANT := jacinto6
73 87
74# OMAP Product Version 88# OMAP Product Version
89# FIXME: Get rid of this
75VS_PRODUCT_VERSION := 5 90VS_PRODUCT_VERSION := 5
76 91
77# FIXME: Re-enable this ASAP 92# FIXME: Re-enable this ASAP
78SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 93SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
94
79endif 95endif
80 96
81# Handle any TARGET_DEVICE remapping. Not all DDK TARGET_DEVICEs 97# Handle any TARGET_DEVICE remapping. Not all DDK TARGET_DEVICEs
@@ -92,15 +108,19 @@ SGX_DYNAMIC_TIMING_INFO := 1
92 108
93SUPPORT_LINUX_USING_WORKQUEUES := 1 109SUPPORT_LINUX_USING_WORKQUEUES := 1
94 110
95SUPPORT_PVRSRV_ANDROID_SYSTRACE := 0 111SUPPORT_PVRSRV_ANDROID_SYSTRACE := 1
96 112
97ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0) 113SUPPORT_DMABUF := 1
114
115# TODO: Set SUPPORT_PVRSVR_DEVICE_CLASS to 0
116#DISPLAY_CONTROLLER should not be used for DRM based display controller
117#ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
98#DISPLAY_CONTROLLER := omaplfb 118#DISPLAY_CONTROLLER := omaplfb
99endif 119#endif
100 120
101PVR_SYSTEM := omap 121PVR_SYSTEM := omap
102 122
103KERNEL_CROSS_COMPILE ?= arm-none-linux-gnueabi- 123KERNEL_CROSS_COMPILE ?= arm-eabi-
104 124
105# We have more memory on OMAP platforms, so we can spare to make the 125# We have more memory on OMAP platforms, so we can spare to make the
106# pool larger, and have higher resolutions which benefit from it. 126# pool larger, and have higher resolutions which benefit from it.
@@ -126,6 +146,9 @@ ifneq ($(strip $(KERNELDIR)),)
126 SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1 146 SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
127 SYS_OMAP_HAS_DVFS_FRAMEWORK := 0 147 SYS_OMAP_HAS_DVFS_FRAMEWORK := 0
128 endif 148 endif
149 ifeq ($(call kernel-version-at-least,3,8,13),true)
150 PVR_LDM_DEVICE_TREE := 1
151 endif
129else 152else
130 $(warning "KERNELDIR is not set, so can't feature check DVFS or dsscomp.") 153 $(warning "KERNELDIR is not set, so can't feature check DVFS or dsscomp.")
131 $(warning "Assuming we want DVFS and dsscomp support.") 154 $(warning "Assuming we want DVFS and dsscomp support.")
@@ -143,6 +166,7 @@ DISPLAY_CONTROLLER_COMPONENT := linux_framebuffer
143OMAP_NON_FLIP_DISPLAY := 1 166OMAP_NON_FLIP_DISPLAY := 1
144endif 167endif
145else # LDM_PLATFORM != 1 168else # LDM_PLATFORM != 1
169# TODO: we should set DEVICE_CLASS to zero
146ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0) 170ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
147#DISPLAY_CONTROLLER_COMPONENT := dc_omapfb3_linux 171#DISPLAY_CONTROLLER_COMPONENT := dc_omapfb3_linux
148endif 172endif
@@ -176,7 +200,7 @@ SUPPORT_ANDROID_OMAP_NV12 := 1
176 200
177PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT := 1 201PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT := 1
178 202
179PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 0 203PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 1
180 204
181# Handle Google's OMAP-based products 205# Handle Google's OMAP-based products
182# 206#
@@ -200,6 +224,9 @@ endif
200endif # SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED == 1 224endif # SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED == 1
201endif # NO_HARDWARE == 1 225endif # NO_HARDWARE == 1
202 226
227# we are not using PVR composerhal
228#PVR_ANDROID_COMPOSERHAL ?= omap
229
203include ../config/core.mk 230include ../config/core.mk
204include ../common/android/extra_config.mk 231include ../common/android/extra_config.mk
205include ../common/dridrm.mk 232include ../common/dridrm.mk
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile
index 8a65e7d..6c9b932 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile
@@ -39,56 +39,69 @@
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ########################################################################### 40### ###########################################################################
41 41
42# If a product wasn't specified, we're an OMAP4430 blaze. 42include ../kernel_version.mk
43ifeq ($(call kernel-version-at-least,3,8,13),true)
44 SUPPORT_LWS_WITH_DC ?= 0
45endif
46include ../config/window_system.mk
47
48# If a product wasn't specified, we're a J6 EVM.
43# 49#
44TARGET_PRODUCT ?= jacinto6evm 50TARGET_PRODUCT ?= jacinto6evm
45 51
52PVRSRV_NEED_PVR_DPF := 1
53PVRSRV_NEW_PVR_DPF := 1
54
46# Customize this build as per the TARGET_PRODUCT setting 55# Customize this build as per the TARGET_PRODUCT setting
47# 56#
48ifneq ($(filter blaze blaze_tablet panda,$(TARGET_PRODUCT)),) 57ifneq ($(filter blaze blaze_tablet panda,$(TARGET_PRODUCT)),)
49SGXCORE := 540 58 SGXCORE := 540
50SGX_CORE_REV := 120 59 SGX_CORE_REV := 120
51endif 60endif
52ifneq ($(filter blaze.4470 blaze_tablet.4470,$(TARGET_PRODUCT)),) 61ifneq ($(filter blaze.4470 blaze_tablet.4470,$(TARGET_PRODUCT)),)
53SGXCORE := 544 62 SGXCORE := 544
54SGX_CORE_REV := 112 63 SGX_CORE_REV := 112
55endif 64endif
56ifneq ($(filter omap5sevm panda5,$(TARGET_PRODUCT)),) 65ifneq ($(filter omap5sevm panda5,$(TARGET_PRODUCT)),)
57SGXCORE := 544 66 SGXCORE := 544
58SGX_CORE_REV := 105 67 SGX_CORE_REV := 105
59SGX_FEATURE_MP := 1 68 SGX_FEATURE_MP := 1
60SGX_FEATURE_SYSTEM_CACHE := 1 69 SGX_FEATURE_SYSTEM_CACHE := 1
61SGX_FEATURE_MP_CORE_COUNT := 2 70 SGX_FEATURE_MP_CORE_COUNT := 2
62PVR_OMAPLFB_DRM_FB := 0 71 PVR_OMAPLFB_DRM_FB := 0
63SYS_OMAP_HAS_DVFS_FRAMEWORK := 1 72 SYS_OMAP_HAS_DVFS_FRAMEWORK := 1
64 73
65# OMAP Product Version 74 # OMAP Product Version
66VS_PRODUCT_VERSION := 5 75 VS_PRODUCT_VERSION := 5
67 76
68# FIXME: Re-enable this ASAP 77 # FIXME: Re-enable this ASAP
69SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 78 SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
70endif 79endif
71ifneq ($(filter jacinto6evm omap5uevm,$(TARGET_PRODUCT)),) 80ifneq ($(filter jacinto6evm omap5uevm,$(TARGET_PRODUCT)),)
72SGXCORE := 544 81 SGXCORE := 544
73SGX_CORE_REV := 116 82 SGX_CORE_REV := 116
74SGX_FEATURE_MP := 1 83 SGX_FEATURE_MP := 1
75SGX_FEATURE_SYSTEM_CACHE := 1 84 SGX_FEATURE_SYSTEM_CACHE := 1
76SGX_FEATURE_MP_CORE_COUNT := 2 85 SGX_FEATURE_MP_CORE_COUNT := 2
86 SYS_OMAP_HAS_DVFS_FRAMEWORK := 1
77 87
78SYS_OMAP5_UEVM := 1 88 SYS_OMAP5_UEVM := 1
79 89
80# OMAP Product Version 90 # OMAP Product Version
81VS_PRODUCT_VERSION := 5 91 VS_PRODUCT_VERSION := 5
82endif 92endif
83 93
94PVR_NO_OMAP_TIMER := 1
95
84PVR_SYSTEM := omap 96PVR_SYSTEM := omap
85 97
86KERNEL_COMPONENTS := srvkm bufferclass_example 98KERNEL_COMPONENTS := srvkm
99ifeq ($(PVR_LWS_NOBC),)
100KERNEL_COMPONENTS += bufferclass_example
101endif
87 102
88SUPPORT_OLD_ION_API := 1 103SUPPORT_OLD_ION_API := 1
89 104
90include ../kernel_version.mk
91
92# Only enable active power management if passive power management is 105# Only enable active power management if passive power management is
93# enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP, 106# enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP,
94# the system can suspend in the case where active power management is 107# the system can suspend in the case where active power management is
@@ -99,8 +112,9 @@ LDM_PLATFORM ?= 1
99 112
100ifeq ($(LDM_PLATFORM),1) 113ifeq ($(LDM_PLATFORM),1)
101SUPPORT_LINUX_USING_WORKQUEUES := 1 114SUPPORT_LINUX_USING_WORKQUEUES := 1
102DISPLAY_CONTROLLER_COMPONENT += dc_omapfb3_linux 115#With DRM EGL and display, omaplfb is not needed
103DISPLAY_CONTROLLER := omaplfb 116#DISPLAY_CONTROLLER_COMPONENT += dc_omapfb3_linux
117#DISPLAY_CONTROLLER := omaplfb
104else 118else
105SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1 119SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1
106OMAP_NON_FLIP_DISPLAY := 1 120OMAP_NON_FLIP_DISPLAY := 1
@@ -142,16 +156,25 @@ SYS_CUSTOM_POWERLOCK_WRAP := 1
142 156
143ifeq ($(OMAP_NON_FLIP_DISPLAY),1) 157ifeq ($(OMAP_NON_FLIP_DISPLAY),1)
144OPK_DEFAULT := libpvrPVR2D_BLITWSEGL.so 158OPK_DEFAULT := libpvrPVR2D_BLITWSEGL.so
145else
146OPK_DEFAULT := libpvrPVR2D_FLIPWSEGL.so
147endif 159endif
148 160
149ifeq ($(SYS_OMAP5_UEVM),1) 161ifeq ($(SYS_OMAP5_UEVM),1)
162XORG_EXPLICIT_PVR_SERVICES_LOAD := 1
163ifeq ($(call kernel-version-at-least,3,8,13),true)
164LDM_PLATFORM := 1
165PVR_LDM_DEVICE_TREE := 1
166else
150PVR_LDM_PLATFORM_PRE_REGISTERED := 1 167PVR_LDM_PLATFORM_PRE_REGISTERED := 1
151PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"omapdrm_pvr\"" 168PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"omapdrm_pvr\""
152XORG_EXPLICIT_PVR_SERVICES_LOAD := 1 169endif
170ifeq ($(PVR_LWS_NODC),1)
171# No display class driver.
172DISPLAY_CONTROLLER_COMPONENT :=
173DISPLAY_CONTROLLER :=
174else
153PVR_OMAPLFB_DRM_FB := 0 175PVR_OMAPLFB_DRM_FB := 0
154PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY := 1 176PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY := 1
177endif
155else 178else
156ifeq ($(call kernel-version-at-least,2,6,35),true) 179ifeq ($(call kernel-version-at-least,2,6,35),true)
157# Work around flipping problems seen with the Taal LCDs on Blaze. 180# Work around flipping problems seen with the Taal LCDs on Blaze.
@@ -182,16 +205,17 @@ endif
182endif 205endif
183endif 206endif
184 207
185include ../common/xorg_test.mk
186ifeq ($(SUPPORT_BUILD_XORG),1)
187SUPPORT_DRI_DRM := 1
188endif
189
190ifeq ($(SUPPORT_DRI_DRM),1) 208ifeq ($(SUPPORT_DRI_DRM),1)
191ifeq ($(SYS_OMAP5_UEVM),1) 209ifeq ($(SYS_OMAP5_UEVM),1)
192PVR_DRI_DRM_PLATFORM_DEV := 1 210PVR_DRI_DRM_PLATFORM_DEV := 1
211ifneq ($(call kernel-version-at-least,3,8,13),true)
193PVR_DRI_DRM_STATIC_BUS_ID := 1 212PVR_DRI_DRM_STATIC_BUS_ID := 1
194PVR_DRI_DRM_DEV_BUS_ID := "\"platform:omapdrm_pvr:00"\" 213PVR_DRI_DRM_DEV_BUS_ID := "\"platform:omapdrm_pvr:00"\"
214endif
215ifeq ($(PVR_LWS_NODC),1)
216PVR_DRM_MODESET_DRIVER_NAME := omapdrm
217PVR_DRM_MODESET_MODULE_NAME := dumb
218endif
195else 219else
196ifeq ($(call kernel-version-at-least,2,6,35),true) 220ifeq ($(call kernel-version-at-least,2,6,35),true)
197PVR_DRI_DRM_PLATFORM_DEV := 1 221PVR_DRI_DRM_PLATFORM_DEV := 1
@@ -212,6 +236,9 @@ endif # kernel-version-at-least,2,6,35
212endif # ($(SYS_OMAP5_UEVM),1) 236endif # ($(SYS_OMAP5_UEVM),1)
213endif # SUPPORT_DRI_DRM 237endif # SUPPORT_DRI_DRM
214 238
239include ../common/xorg_test.mk
240
241ifeq ($(PVR_LWS_NODC),)
215ifeq ($(SUPPORT_BUILD_XORG),1) 242ifeq ($(SUPPORT_BUILD_XORG),1)
216ifeq ($(call kernel-version-at-least,2,6,35,7),true) 243ifeq ($(call kernel-version-at-least,2,6,35,7),true)
217# A client DRI authorisation failure, whilst switched away from the X Server 244# A client DRI authorisation failure, whilst switched away from the X Server
@@ -222,16 +249,9 @@ PVR_XORG_DONT_DROP_MASTER_IN_LEAVE_VT := 1
222endif 249endif
223XORG_PVR_VIDEO ?= omap4 250XORG_PVR_VIDEO ?= omap4
224 251
225OPK_FALLBACK := libpvrPVR2D_DRIWSEGL.so
226
227ifneq ($(OMAP_NON_FLIP_DISPLAY),1) 252ifneq ($(OMAP_NON_FLIP_DISPLAY),1)
228PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1 253PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1
229endif 254endif
230
231else # xorg isn't excluded
232
233OPK_FALLBACK := libpvrPVR2D_BLITWSEGL.so
234
235endif # xorg isn't excluded 255endif # xorg isn't excluded
236 256
237ifeq ($(SUPPORT_DRI_DRM),1) 257ifeq ($(SUPPORT_DRI_DRM),1)
@@ -243,6 +263,7 @@ EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
243else 263else
244KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT) 264KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
245endif 265endif
266endif
246 267
247include ../config/core.mk 268include ../config/core.mk
248include ../common/xorg.mk 269include ../common/xorg.mk
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile
index 4473d62..9313a1b 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile
@@ -76,7 +76,7 @@ PVRSRV_DUMP_MK_TRACE ?= 1
76 76
77SUPPORT_ANDROID_SUNXI ?= 1 77SUPPORT_ANDROID_SUNXI ?= 1
78 78
79ION_DEFAULT_HEAP_MASK := ION_HEAP_CARVEOUT_MASK 79ION_DEFAULT_HEAP_ID_MASK := ION_HEAP_CARVEOUT_MASK
80 80
81# We have more memory on the sun6i platform, so we can spare to make 81# We have more memory on the sun6i platform, so we can spare to make
82# the pool larger, and have higher resolutions which benefit from it. 82# the pool larger, and have higher resolutions which benefit from it.
@@ -108,6 +108,8 @@ KERNEL_COMPONENTS += dc_nohw
108endif 108endif
109endif 109endif
110 110
111PVR_ANDROID_COMPOSERHAL ?= sunxi
112
111include ../config/core.mk 113include ../config/core.mk
112include ../common/android/extra_config.mk 114include ../common/android/extra_config.mk
113include ../common/opencl.mk 115include ../common/opencl.mk
diff --git a/jacinto6/sgx_src/eurasia_km/include4/img_defs.h b/jacinto6/sgx_src/eurasia_km/include4/img_defs.h
index bf0c360..b7447d7 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/img_defs.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/img_defs.h
@@ -211,6 +211,10 @@ typedef char TCHAR, *PTCHAR, *PTSTR;
211 #define IMG_UINT64_FMT "ll" /* May need to be updated as required, for other OSs */ 211 #define IMG_UINT64_FMT "ll" /* May need to be updated as required, for other OSs */
212#endif 212#endif
213 213
214/*
215 Some versions of MSVC don't have snprintf, vsnprintf in their CRTs.
216 Remap to the deprecated unix compatibility versions.
217*/
214 218
215#endif /* #if !defined (__IMG_DEFS_H__) */ 219#endif /* #if !defined (__IMG_DEFS_H__) */
216/***************************************************************************** 220/*****************************************************************************
diff --git a/jacinto6/sgx_src/eurasia_km/include4/pvr_debug.h b/jacinto6/sgx_src/eurasia_km/include4/pvr_debug.h
index fcc0275..be78c77 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/pvr_debug.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/pvr_debug.h
@@ -55,12 +55,12 @@ extern "C" {
55/* These are privately used by pvr_debug, use the PVR_DBG_ defines instead */ 55/* These are privately used by pvr_debug, use the PVR_DBG_ defines instead */
56#define DBGPRIV_FATAL 0x001UL 56#define DBGPRIV_FATAL 0x001UL
57#define DBGPRIV_ERROR 0x002UL 57#define DBGPRIV_ERROR 0x002UL
58#define DBGPRIV_WARNING 0x004UL 58#define DBGPRIV_BUFFERED 0x004UL
59#define DBGPRIV_MESSAGE 0x008UL 59#define DBGPRIV_WARNING 0x008UL
60#define DBGPRIV_VERBOSE 0x010UL 60#define DBGPRIV_MESSAGE 0x010UL
61#define DBGPRIV_CALLTRACE 0x020UL 61#define DBGPRIV_VERBOSE 0x020UL
62#define DBGPRIV_ALLOC 0x040UL 62#define DBGPRIV_CALLTRACE 0x040UL
63#define DBGPRIV_BUFFERED 0x080UL 63#define DBGPRIV_ALLOC 0x080UL
64#define DBGPRIV_DBGDRV_MESSAGE 0x100UL 64#define DBGPRIV_DBGDRV_MESSAGE 0x100UL
65 65
66#define DBGPRIV_DBGLEVEL_COUNT 9 66#define DBGPRIV_DBGLEVEL_COUNT 9
@@ -139,33 +139,72 @@ IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugAssertFail(const IMG_CHAR *pszFile,
139 /* New logging mechanism */ 139 /* New logging mechanism */
140 #define PVR_DBG_FATAL DBGPRIV_FATAL 140 #define PVR_DBG_FATAL DBGPRIV_FATAL
141 #define PVR_DBG_ERROR DBGPRIV_ERROR 141 #define PVR_DBG_ERROR DBGPRIV_ERROR
142 #define PVR_DBG_BUFFERED DBGPRIV_BUFFERED
142 #define PVR_DBG_WARNING DBGPRIV_WARNING 143 #define PVR_DBG_WARNING DBGPRIV_WARNING
143 #define PVR_DBG_MESSAGE DBGPRIV_MESSAGE 144 #define PVR_DBG_MESSAGE DBGPRIV_MESSAGE
144 #define PVR_DBG_VERBOSE DBGPRIV_VERBOSE 145 #define PVR_DBG_VERBOSE DBGPRIV_VERBOSE
145 #define PVR_DBG_CALLTRACE DBGPRIV_CALLTRACE 146 #define PVR_DBG_CALLTRACE DBGPRIV_CALLTRACE
146 #define PVR_DBG_ALLOC DBGPRIV_ALLOC 147 #define PVR_DBG_ALLOC DBGPRIV_ALLOC
147 #define PVR_DBG_BUFFERED DBGPRIV_BUFFERED
148 #define PVR_DBGDRIV_MESSAGE DBGPRIV_DBGDRV_MESSAGE 148 #define PVR_DBGDRIV_MESSAGE DBGPRIV_DBGDRV_MESSAGE
149 149
150 /* These levels are always on with PVRSRV_NEED_PVR_DPF */ 150 /* These levels are always on with PVRSRV_NEED_PVR_DPF */
151 #define __PVR_DPF_0x001UL(x...) PVRSRVDebugPrintf(DBGPRIV_FATAL, x) 151 #define __PVR_DPF_0x001UL(x...) PVRSRVDebugPrintf(DBGPRIV_FATAL, x)
152 #define __PVR_DPF_0x002UL(x...) PVRSRVDebugPrintf(DBGPRIV_ERROR, x) 152 #define __PVR_DPF_0x002UL(x...) PVRSRVDebugPrintf(DBGPRIV_ERROR, x)
153 #define __PVR_DPF_0x080UL(x...) PVRSRVDebugPrintf(DBGPRIV_BUFFERED, x) 153 #define __PVR_DPF_0x004UL(x...) PVRSRVDebugPrintf(DBGPRIV_BUFFERED, x)
154 154
155 /* Some are compiled out completely in release builds */ 155 /* Some are compiled out completely in release builds */
156#if defined(DEBUG) 156#if defined(DEBUG)
157 #define __PVR_DPF_0x004UL(x...) PVRSRVDebugPrintf(DBGPRIV_WARNING, x) 157 #define __PVR_DPF_0x008UL(x...) PVRSRVDebugPrintf(DBGPRIV_WARNING, x)
158 #define __PVR_DPF_0x008UL(x...) PVRSRVDebugPrintf(DBGPRIV_MESSAGE, x) 158 #define __PVR_DPF_0x010UL(x...) PVRSRVDebugPrintf(DBGPRIV_MESSAGE, x)
159 #define __PVR_DPF_0x010UL(x...) PVRSRVDebugPrintf(DBGPRIV_VERBOSE, x) 159 #define __PVR_DPF_0x020UL(x...) PVRSRVDebugPrintf(DBGPRIV_VERBOSE, x)
160 #define __PVR_DPF_0x020UL(x...) PVRSRVDebugPrintf(DBGPRIV_CALLTRACE, x) 160 #define __PVR_DPF_0x040UL(x...) PVRSRVDebugPrintf(DBGPRIV_CALLTRACE, x)
161 #define __PVR_DPF_0x040UL(x...) PVRSRVDebugPrintf(DBGPRIV_ALLOC, x) 161 #define __PVR_DPF_0x080UL(x...) PVRSRVDebugPrintf(DBGPRIV_ALLOC, x)
162 #define __PVR_DPF_0x100UL(x...) PVRSRVDebugPrintf(DBGPRIV_DBGDRV_MESSAGE, x)
163
164#elif defined(PVR_DBGPRIV_LEVEL)
165
166#if (PVR_DBGPRIV_LEVEL >= DBGPRIV_WARNING)
167 #define __PVR_DPF_0x008UL(x...) PVRSRVDebugPrintf(DBGPRIV_WARNING, x)
168#else
169 #define __PVR_DPF_0x008UL(x...)
170#endif
171
172#if (PVR_DBGPRIV_LEVEL >= DBGPRIV_MESSAGE)
173 #define __PVR_DPF_0x010UL(x...) PVRSRVDebugPrintf(DBGPRIV_MESSAGE, x)
174#else
175 #define __PVR_DPF_0x010UL(x...)
176#endif
177
178#if (PVR_DBGPRIV_LEVEL >= DBGPRIV_VERBOSE)
179 #define __PVR_DPF_0x020UL(x...) PVRSRVDebugPrintf(DBGPRIV_VERBOSE, x)
180#else
181 #define __PVR_DPF_0x020UL(x...)
182#endif
183
184#if (PVR_DBGPRIV_LEVEL >= DBGPRIV_CALLTRACE)
185 #define __PVR_DPF_0x040UL(x...) PVRSRVDebugPrintf(DBGPRIV_CALLTRACE, x)
186#else
187 #define __PVR_DPF_0x040UL(x...)
188#endif
189
190#if (PVR_DBGPRIV_LEVEL >= DBGPRIV_ALLOC)
191 #define __PVR_DPF_0x080UL(x...) PVRSRVDebugPrintf(DBGPRIV_ALLOC, x)
192#else
193 #define __PVR_DPF_0x080UL(x...)
194#endif
195
196#if (PVR_DBGPRIV_LEVEL >= DBGPRIV_DBGDRV_MESSAGE)
162 #define __PVR_DPF_0x100UL(x...) PVRSRVDebugPrintf(DBGPRIV_DBGDRV_MESSAGE, x) 197 #define __PVR_DPF_0x100UL(x...) PVRSRVDebugPrintf(DBGPRIV_DBGDRV_MESSAGE, x)
163#else 198#else
164 #define __PVR_DPF_0x004UL(x...) 199 #define __PVR_DPF_0x100UL(x...)
200#endif
201
202#else
165 #define __PVR_DPF_0x008UL(x...) 203 #define __PVR_DPF_0x008UL(x...)
166 #define __PVR_DPF_0x010UL(x...) 204 #define __PVR_DPF_0x010UL(x...)
167 #define __PVR_DPF_0x020UL(x...) 205 #define __PVR_DPF_0x020UL(x...)
168 #define __PVR_DPF_0x040UL(x...) 206 #define __PVR_DPF_0x040UL(x...)
207 #define __PVR_DPF_0x080UL(x...)
169 #define __PVR_DPF_0x100UL(x...) 208 #define __PVR_DPF_0x100UL(x...)
170#endif 209#endif
171 210
@@ -204,6 +243,10 @@ IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugPrintf(IMG_UINT32 ui32DebugLevel,
204 const IMG_CHAR *pszFormat, 243 const IMG_CHAR *pszFormat,
205 ...) IMG_FORMAT_PRINTF(4, 5); 244 ...) IMG_FORMAT_PRINTF(4, 5);
206 245
246#if defined(PVR_DBGPRIV_LEVEL) && defined(SUPPORT_ANDROID_PLATFORM)
247IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugPrintfSetLevel(IMG_UINT32 ui32DebugLevel);
248#endif
249
207IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugPrintfDumpCCB(void); 250IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugPrintfDumpCCB(void);
208 251
209#else /* defined(PVRSRV_NEED_PVR_DPF) */ 252#else /* defined(PVRSRV_NEED_PVR_DPF) */
diff --git a/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h b/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h
index a8dbd13..d48838f 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h
@@ -49,20 +49,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49#define PVR_STR2(X) PVR_STR(X) 49#define PVR_STR2(X) PVR_STR(X)
50 50
51#define PVRVERSION_MAJ 1 51#define PVRVERSION_MAJ 1
52#define PVRVERSION_MIN 12 52#define PVRVERSION_MIN 14
53 53
54#define PVRVERSION_FAMILY "sgxddk" 54#define PVRVERSION_FAMILY "sgxddk"
55#define PVRVERSION_BRANCHNAME "1.12" 55#define PVRVERSION_BRANCHNAME "1.14"
56#define PVRVERSION_BUILD 2917986 56#define PVRVERSION_BUILD 4001660
57#define PVRVERSION_BSCONTROL "SGX_DDK" 57#define PVRVERSION_BSCONTROL "SGX_DDK_Linux_XOrg"
58 58
59#define PVRVERSION_STRING "SGX_DDK sgxddk 1.12@" PVR_STR2(PVRVERSION_BUILD) 59#define PVRVERSION_STRING "SGX_DDK_Linux_XOrg sgxddk 1.14@" PVR_STR2(PVRVERSION_BUILD)
60#define PVRVERSION_STRING_SHORT "1.12@" PVR_STR2(PVRVERSION_BUILD) "" 60#define PVRVERSION_STRING_SHORT "1.14@" PVR_STR2(PVRVERSION_BUILD) ""
61 61
62#define COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved." 62#define COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved."
63 63
64#define PVRVERSION_BUILD_HI 291 64#define PVRVERSION_BUILD_HI 400
65#define PVRVERSION_BUILD_LO 7986 65#define PVRVERSION_BUILD_LO 1660
66#define PVRVERSION_STRING_NUMERIC PVR_STR2(PVRVERSION_MAJ) "." PVR_STR2(PVRVERSION_MIN) "." PVR_STR2(PVRVERSION_BUILD_HI) "." PVR_STR2(PVRVERSION_BUILD_LO) 66#define PVRVERSION_STRING_NUMERIC PVR_STR2(PVRVERSION_MAJ) "." PVR_STR2(PVRVERSION_MIN) "." PVR_STR2(PVRVERSION_BUILD_HI) "." PVR_STR2(PVRVERSION_BUILD_LO)
67 67
68#endif /* _PVRVERSION_H_ */ 68#endif /* _PVRVERSION_H_ */
diff --git a/jacinto6/sgx_src/eurasia_km/include4/services.h b/jacinto6/sgx_src/eurasia_km/include4/services.h
index cca0f7d..a5767cb 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/services.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/services.h
@@ -92,7 +92,6 @@ extern "C" {
92#define PVRSRV_MEM_NO_RESMAN (1U<<10) 92#define PVRSRV_MEM_NO_RESMAN (1U<<10)
93#define PVRSRV_MEM_EXPORTED (1U<<11) 93#define PVRSRV_MEM_EXPORTED (1U<<11)
94 94
95
96/* 95/*
97 Heap Attribute flags 96 Heap Attribute flags
98 (bits 12-23) 97 (bits 12-23)
@@ -169,8 +168,6 @@ extern "C" {
169#define PVRSRV_MISC_INFO_GET_REF_COUNT_PRESENT (1U<<7) 168#define PVRSRV_MISC_INFO_GET_REF_COUNT_PRESENT (1U<<7)
170#define PVRSRV_MISC_INFO_GET_PAGE_SIZE_PRESENT (1U<<8) 169#define PVRSRV_MISC_INFO_GET_PAGE_SIZE_PRESENT (1U<<8)
171#define PVRSRV_MISC_INFO_FORCE_SWAP_TO_SYSTEM_PRESENT (1U<<9) 170#define PVRSRV_MISC_INFO_FORCE_SWAP_TO_SYSTEM_PRESENT (1U<<9)
172#define PVRSRV_MISC_INFO_GET_DRM_FD_PRESENT (1U<<10)
173#define PVRSRV_MISC_INFO_SET_DRM_FD_PRESENT (1U<<11)
174 171
175#define PVRSRV_MISC_INFO_RESET_PRESENT (1U<<31) 172#define PVRSRV_MISC_INFO_RESET_PRESENT (1U<<31)
176 173
@@ -402,6 +399,26 @@ typedef struct _PVRSRV_MEMBLK_
402 ****************************************************************************** 399 ******************************************************************************
403 * Memory Management (externel interface) 400 * Memory Management (externel interface)
404 *****************************************************************************/ 401 *****************************************************************************/
402#if defined (PVRSRV_DEVMEM_TIME_STATS)
403typedef struct _DEVMEM_UNMAPPING_TIME_STATS_
404{
405 IMG_UINT32 ui32TimeToCPUUnmap;
406 IMG_UINT32 ui32TimeToDevUnmap;
407} DEVMEM_UNMAPPING_TIME_STATS;
408
409typedef struct _PVRSRV_DEVMEM_TIMING_STATS_
410{
411 /* This struct holds time taken to map/unmap device memory into CPU/GPU in microsec granularity */
412 struct
413 {
414 IMG_UINT32 ui32TimeToCPUMap;
415 IMG_UINT32 ui32TimeToDevMap;
416 } sDevMemMapTimes;
417
418 DEVMEM_UNMAPPING_TIME_STATS *psDevMemUnmapTimes; /* User supplied space for "unmap" timings */
419} PVRSRV_DEVMEM_TIMING_STATS;
420#endif
421
405typedef struct _PVRSRV_KERNEL_MEM_INFO_ *PPVRSRV_KERNEL_MEM_INFO; 422typedef struct _PVRSRV_KERNEL_MEM_INFO_ *PPVRSRV_KERNEL_MEM_INFO;
406 423
407typedef struct _PVRSRV_CLIENT_MEM_INFO_ 424typedef struct _PVRSRV_CLIENT_MEM_INFO_
@@ -446,12 +463,16 @@ typedef struct _PVRSRV_CLIENT_MEM_INFO_
446 IMG_UINT32 dummy2; 463 IMG_UINT32 dummy2;
447 #endif /* !defined(USE_CODE) */ 464 #endif /* !defined(USE_CODE) */
448#endif /* defined(SUPPORT_MEMINFO_IDS) */ 465#endif /* defined(SUPPORT_MEMINFO_IDS) */
449#if defined(SUPPORT_DRM_GEM)
450 IMG_SIZE_T uiDmabufBufferSize;
451#endif /* defined(SUPPORT_DRM_GEM) */
452#if defined(SUPPORT_ION) 466#if defined(SUPPORT_ION)
453 IMG_SIZE_T uiIonBufferSize; 467 IMG_SIZE_T uiIonBufferSize;
454#endif /* defined(SUPPORT_ION) */ 468#endif /* defined(SUPPORT_ION) */
469#if defined(SUPPORT_DMABUF)
470 IMG_SIZE_T uiDmaBufSize;
471#endif /* defined(SUPPORT_ION) */
472
473#if defined (PVRSRV_DEVMEM_TIME_STATS)
474 PVRSRV_DEVMEM_TIMING_STATS sDevMemTimingStats;
475#endif
455 476
456 /* 477 /*
457 ptr to next mem info 478 ptr to next mem info
@@ -582,7 +603,6 @@ typedef struct _PVRSRV_MISC_INFO_
582 } sGetRefCountCtl; 603 } sGetRefCountCtl;
583 604
584 IMG_UINT32 ui32PageSize; 605 IMG_UINT32 ui32PageSize;
585 IMG_INT32 iDrmFd;
586} PVRSRV_MISC_INFO; 606} PVRSRV_MISC_INFO;
587 607
588/*! 608/*!
@@ -784,21 +804,6 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVMapDeviceMemory2(IMG_CONST PVRSRV_DEV_DATA *psDe
784 PVRSRV_CLIENT_MEM_INFO **ppsDstMemInfo); 804 PVRSRV_CLIENT_MEM_INFO **ppsDstMemInfo);
785#endif /* defined(LINUX) */ 805#endif /* defined(LINUX) */
786 806
787#if defined(SUPPORT_DRM_GEM)
788PVRSRV_ERROR PVRSRVMapDmabuf(const PVRSRV_DEV_DATA *psDevData,
789 IMG_HANDLE hDevMemHeap,
790 IMG_UINT32 ui32NumFDs,
791 IMG_INT *paiBufferFDs,
792 IMG_UINT32 ui32ChunkCount,
793 IMG_SIZE_T *pauiOffset,
794 IMG_SIZE_T *pauiSize,
795 IMG_UINT32 ui32Attribs,
796 PVRSRV_CLIENT_MEM_INFO **ppsMemInfo);
797
798PVRSRV_ERROR PVRSRVUnmapDmabuf(const PVRSRV_DEV_DATA *psDevData,
799 PVRSRV_CLIENT_MEM_INFO *psMemInfo);
800#endif /* defined (SUPPORT_DRM_GEM) */
801
802#if defined(SUPPORT_ION) 807#if defined(SUPPORT_ION)
803PVRSRV_ERROR PVRSRVMapIonHandle(const PVRSRV_DEV_DATA *psDevData, 808PVRSRV_ERROR PVRSRVMapIonHandle(const PVRSRV_DEV_DATA *psDevData,
804 IMG_HANDLE hDevMemHeap, 809 IMG_HANDLE hDevMemHeap,
@@ -814,6 +819,29 @@ PVRSRV_ERROR PVRSRVUnmapIonHandle(const PVRSRV_DEV_DATA *psDevData,
814 PVRSRV_CLIENT_MEM_INFO *psMemInfo); 819 PVRSRV_CLIENT_MEM_INFO *psMemInfo);
815#endif /* defined (SUPPORT_ION) */ 820#endif /* defined (SUPPORT_ION) */
816 821
822#if defined(SUPPORT_DMABUF)
823IMG_IMPORT
824PVRSRV_ERROR PVRSRVMapDmaBufs(const PVRSRV_DEV_DATA *psDevData,
825 const IMG_HANDLE hDevMemHeap,
826 const IMG_UINT32 ui32Attribs,
827 const IMG_UINT32 ui32NumFDs,
828 const IMG_INT *piDmaBufFD,
829 const IMG_SIZE_T *puiDmaBufOffset,
830 const IMG_SIZE_T *puiDmaBufSize,
831 PVRSRV_CLIENT_MEM_INFO **ppsMemInfo,
832 IMG_SIZE_T *puiMemInfoOffset);
833
834IMG_IMPORT
835PVRSRV_ERROR PVRSRVMapDmaBuf(const PVRSRV_DEV_DATA *psDevData,
836 const IMG_HANDLE hDevMemHeap,
837 const IMG_INT iDmaBufFD,
838 const IMG_UINT32 ui32Attribs,
839 PVRSRV_CLIENT_MEM_INFO **ppsMemInfo);
840
841IMG_IMPORT
842PVRSRV_ERROR PVRSRVUnmapDmaBuf(const PVRSRV_DEV_DATA *psDevData,
843 PVRSRV_CLIENT_MEM_INFO *psMemInfo);
844#endif /* SUPPORT_DMABUF */
817 845
818IMG_IMPORT 846IMG_IMPORT
819PVRSRV_ERROR IMG_CALLCONV PVRSRVAllocDeviceMemSparse(const PVRSRV_DEV_DATA *psDevData, 847PVRSRV_ERROR IMG_CALLCONV PVRSRVAllocDeviceMemSparse(const PVRSRV_DEV_DATA *psDevData,
diff --git a/jacinto6/sgx_src/eurasia_km/include4/servicesext.h b/jacinto6/sgx_src/eurasia_km/include4/servicesext.h
index a0aff8c..ffb89b9 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/servicesext.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/servicesext.h
@@ -762,6 +762,9 @@ typedef struct PVRSRV_RESOURCE_TAG
762{ 762{
763 volatile IMG_UINT32 ui32Lock; 763 volatile IMG_UINT32 ui32Lock;
764 IMG_UINT32 ui32ID; 764 IMG_UINT32 ui32ID;
765#if !defined(PVR_LINUX_USING_WORKQUEUES) && defined(__linux__)
766 IMG_VOID *pOSSyncPrimitive;
767#endif /* !defined(PVR_LINUX_USING_WORKQUEUES) && defined(__linux__) */
765}PVRSRV_RESOURCE; 768}PVRSRV_RESOURCE;
766typedef PVRSRV_RESOURCE PVRSRV_RES_HANDLE; 769typedef PVRSRV_RESOURCE PVRSRV_RES_HANDLE;
767 770
@@ -925,12 +928,17 @@ typedef struct _PVRSRV_REGISTRY_INFO_
925PVRSRV_ERROR IMG_CALLCONV PVRSRVReadRegistryString (PPVRSRV_REGISTRY_INFO psRegInfo); 928PVRSRV_ERROR IMG_CALLCONV PVRSRVReadRegistryString (PPVRSRV_REGISTRY_INFO psRegInfo);
926PVRSRV_ERROR IMG_CALLCONV PVRSRVWriteRegistryString (PPVRSRV_REGISTRY_INFO psRegInfo); 929PVRSRV_ERROR IMG_CALLCONV PVRSRVWriteRegistryString (PPVRSRV_REGISTRY_INFO psRegInfo);
927 930
931#define PVRSRV_BC_FLAGS_YUVCSC_RANGE_MASK (0x01)
932#define PVRSRV_BC_FLAGS_YUVCSC_RANGE_SHIFT (0x00)
933#define PVRSRV_BC_FLAGS_YUVCSC_CONFORMANT_RANGE (0 << PVRSRV_BC_FLAGS_YUVCSC_RANGE_SHIFT)
934#define PVRSRV_BC_FLAGS_YUVCSC_FULL_RANGE (1 << PVRSRV_BC_FLAGS_YUVCSC_RANGE_SHIFT)
928 935
929#define PVRSRV_BC_FLAGS_YUVCSC_CONFORMANT_RANGE (0 << 0) 936#define PVRSRV_BC_FLAGS_YUVCSC_CS_MASK (0x02)
930#define PVRSRV_BC_FLAGS_YUVCSC_FULL_RANGE (1 << 0) 937#define PVRSRV_BC_FLAGS_YUVCSC_CS_SHIFT (0x01)
938#define PVRSRV_BC_FLAGS_YUVCSC_BT601 (0 << PVRSRV_BC_FLAGS_YUVCSC_CS_SHIFT)
939#define PVRSRV_BC_FLAGS_YUVCSC_BT709 (1 << PVRSRV_BC_FLAGS_YUVCSC_CS_SHIFT)
931 940
932#define PVRSRV_BC_FLAGS_YUVCSC_BT601 (0 << 1) 941#define PVRSRV_BC_FLAGS_YUVCSC_MASK (PVRSRV_BC_FLAGS_YUVCSC_RANGE_MASK | PVRSRV_BC_FLAGS_YUVCSC_CS_MASK)
933#define PVRSRV_BC_FLAGS_YUVCSC_BT709 (1 << 1)
934 942
935#define MAX_BUFFER_DEVICE_NAME_SIZE (50) /* arbitrary choice! */ 943#define MAX_BUFFER_DEVICE_NAME_SIZE (50) /* arbitrary choice! */
936 944
diff --git a/jacinto6/sgx_src/eurasia_km/include4/sgxapi_km.h b/jacinto6/sgx_src/eurasia_km/include4/sgxapi_km.h
index d001e6f..6453db6 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/sgxapi_km.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/sgxapi_km.h
@@ -84,7 +84,12 @@ extern "C" {
84#define SGX_VPB_TILED_HEAP_ID 14 84#define SGX_VPB_TILED_HEAP_ID 14
85#endif 85#endif
86 86
87#define SGX_MAX_HEAP_ID 15 87#if defined(SGX_FEATURE_ADDRESS_SPACE_EXTENSION)
88 #define SGX_TEXTURE_HEAP_ID 15
89 #define SGX_MAX_HEAP_ID 16
90#else
91 #define SGX_MAX_HEAP_ID 15
92#endif
88 93
89/* 94/*
90 * Keep SGX_3DPARAMETERS_HEAP_ID as TQ full custom 95 * Keep SGX_3DPARAMETERS_HEAP_ID as TQ full custom
@@ -106,20 +111,12 @@ extern "C" {
106#define SGX_MAX_TA_STATUS_VALS 32 111#define SGX_MAX_TA_STATUS_VALS 32
107#define SGX_MAX_3D_STATUS_VALS 4 112#define SGX_MAX_3D_STATUS_VALS 4
108 113
109#if defined(SUPPORT_SGX_GENERALISED_SYNCOBJECTS)
110/* sync info structure array size */
111#define SGX_MAX_TA_DST_SYNCS 1
112#define SGX_MAX_TA_SRC_SYNCS 1
113#define SGX_MAX_3D_SRC_SYNCS 4
114/* note: there is implicitly 1 3D Dst Sync */
115#else
116/* sync info structure array size */ 114/* sync info structure array size */
117#define SGX_MAX_SRC_SYNCS_TA 32 115#define SGX_MAX_SRC_SYNCS_TA 32
118#define SGX_MAX_DST_SYNCS_TA 1 116#define SGX_MAX_DST_SYNCS_TA 1
119/* note: only one dst sync is supported by the 2D paths */ 117/* note: only one dst sync is supported by the 2D paths */
120#define SGX_MAX_SRC_SYNCS_TQ 6 118#define SGX_MAX_SRC_SYNCS_TQ 6
121#define SGX_MAX_DST_SYNCS_TQ 2 119#define SGX_MAX_DST_SYNCS_TQ 2
122#endif
123 120
124 121
125#if defined(SGX_FEATURE_EXTENDED_PERF_COUNTERS) 122#if defined(SGX_FEATURE_EXTENDED_PERF_COUNTERS)
diff --git a/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_displayclass.c b/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_displayclass.c
index 5a6f99f..9000e96 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_displayclass.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_displayclass.c
@@ -353,6 +353,7 @@ static PVRSRV_ERROR CreateDCSwapChain(IMG_HANDLE hDevice,
353 DC_NOHW_SWAPCHAIN *psSwapChain; 353 DC_NOHW_SWAPCHAIN *psSwapChain;
354 DC_NOHW_BUFFER *psBuffer; 354 DC_NOHW_BUFFER *psBuffer;
355 IMG_UINT32 i; 355 IMG_UINT32 i;
356 PVRSRV_ERROR eError;
356 357
357 UNREFERENCED_PARAMETER(ui32OEMFlags); 358 UNREFERENCED_PARAMETER(ui32OEMFlags);
358 UNREFERENCED_PARAMETER(pui32SwapChainID); 359 UNREFERENCED_PARAMETER(pui32SwapChainID);
@@ -386,11 +387,11 @@ static PVRSRV_ERROR CreateDCSwapChain(IMG_HANDLE hDevice,
386 387
387 if (ui32BufferCount) 388 if (ui32BufferCount)
388 { 389 {
389
390 /* check the buffer count */ 390 /* check the buffer count */
391 if(ui32BufferCount > DC_NOHW_MAX_BACKBUFFERS) 391 if(ui32BufferCount > DC_NOHW_MAX_BACKBUFFERS)
392 { 392 {
393 return (PVRSRV_ERROR_TOOMANYBUFFERS); 393 eError = PVRSRV_ERROR_TOOMANYBUFFERS;
394 goto ExitError;
394 } 395 }
395 396
396 /* 397 /*
@@ -403,7 +404,8 @@ static PVRSRV_ERROR CreateDCSwapChain(IMG_HANDLE hDevice,
403 || psDstSurfAttrib->sDims.ui32Height != psDevInfo->sSysDims.ui32Height) 404 || psDstSurfAttrib->sDims.ui32Height != psDevInfo->sSysDims.ui32Height)
404 { 405 {
405 /* DST doesn't match the current mode */ 406 /* DST doesn't match the current mode */
406 return (PVRSRV_ERROR_INVALID_PARAMS); 407 eError = PVRSRV_ERROR_INVALID_PARAMS;
408 goto ExitError;
407 } 409 }
408 410
409 if(psDstSurfAttrib->pixelformat != psSrcSurfAttrib->pixelformat 411 if(psDstSurfAttrib->pixelformat != psSrcSurfAttrib->pixelformat
@@ -412,19 +414,18 @@ static PVRSRV_ERROR CreateDCSwapChain(IMG_HANDLE hDevice,
412 || psDstSurfAttrib->sDims.ui32Height != psSrcSurfAttrib->sDims.ui32Height) 414 || psDstSurfAttrib->sDims.ui32Height != psSrcSurfAttrib->sDims.ui32Height)
413 { 415 {
414 /* DST doesn't match the SRC */ 416 /* DST doesn't match the SRC */
415 return (PVRSRV_ERROR_INVALID_PARAMS); 417 eError = PVRSRV_ERROR_INVALID_PARAMS;
418 goto ExitError;
416 } 419 }
417 420
418 /* INTEGRATION_POINT: check the flags */ 421 /* INTEGRATION_POINT: check the flags */
419 UNREFERENCED_PARAMETER(ui32Flags); 422 UNREFERENCED_PARAMETER(ui32Flags);
420 423
421
422
423 psBuffer = (DC_NOHW_BUFFER*)AllocKernelMem(sizeof(DC_NOHW_BUFFER) * ui32BufferCount); 424 psBuffer = (DC_NOHW_BUFFER*)AllocKernelMem(sizeof(DC_NOHW_BUFFER) * ui32BufferCount);
424 if(!psBuffer) 425 if(!psBuffer)
425 { 426 {
426 FreeKernelMem(psSwapChain); 427 eError = PVRSRV_ERROR_OUT_OF_MEMORY;
427 return (PVRSRV_ERROR_OUT_OF_MEMORY); 428 goto ExitError;
428 } 429 }
429 430
430 /* initialise allocations */ 431 /* initialise allocations */
@@ -469,6 +470,10 @@ static PVRSRV_ERROR CreateDCSwapChain(IMG_HANDLE hDevice,
469 /* INTEGRATION_POINT: enable Vsync ISR */ 470 /* INTEGRATION_POINT: enable Vsync ISR */
470 471
471 return (PVRSRV_OK); 472 return (PVRSRV_OK);
473
474ExitError:
475 FreeKernelMem(psSwapChain);
476 return eError;
472} 477}
473 478
474 479
@@ -644,7 +649,7 @@ static IMG_BOOL ProcessFlip(IMG_HANDLE hCmdCookie,
644 /* validate data packet */ 649 /* validate data packet */
645 psFlipCmd = (DISPLAYCLASS_FLIP_COMMAND*)pvData; 650 psFlipCmd = (DISPLAYCLASS_FLIP_COMMAND*)pvData;
646 /* Under android, this may be a DISPLAYCLASS_FLIP_COMMAND2, but the structs 651 /* Under android, this may be a DISPLAYCLASS_FLIP_COMMAND2, but the structs
647 * are compatable for everything used by dc_nohw so it makes no difference */ 652 * are compatible for everything used by dc_nohw so it makes no difference */
648 if (psFlipCmd == IMG_NULL) 653 if (psFlipCmd == IMG_NULL)
649 { 654 {
650 return (IMG_FALSE); 655 return (IMG_FALSE);
diff --git a/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c b/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c
index 7af5703..be168c3 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c
@@ -93,11 +93,7 @@ extern struct ion_device *omap_ion_device;
93#error CONFIG_DSSCOMP support requires CONFIG_ION_OMAP 93#error CONFIG_DSSCOMP support requires CONFIG_ION_OMAP
94#endif /* defined(CONFIG_ION_OMAP) */ 94#endif /* defined(CONFIG_ION_OMAP) */
95#if defined(CONFIG_DRM_OMAP_DMM_TILER) 95#if defined(CONFIG_DRM_OMAP_DMM_TILER)
96#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
97#include <../drivers/gpu/drm/omapdrm/omap_dmm_tiler.h>
98#else
99#include <../drivers/staging/omapdrm/omap_dmm_tiler.h> 96#include <../drivers/staging/omapdrm/omap_dmm_tiler.h>
100#endif
101#include <../drivers/video/omap2/dsscomp/tiler-utils.h> 97#include <../drivers/video/omap2/dsscomp/tiler-utils.h>
102#elif defined(CONFIG_TI_TILER) 98#elif defined(CONFIG_TI_TILER)
103#include <mach/tiler.h> 99#include <mach/tiler.h>
@@ -972,10 +968,7 @@ void OMAPLFBSwapHandler(OMAPLFB_BUFFER *psBuffer)
972 if (bPreviouslyNotVSynced || psSwapChain->iBlankEvents != iBlankEvents) 968 if (bPreviouslyNotVSynced || psSwapChain->iBlankEvents != iBlankEvents)
973 { 969 {
974 psSwapChain->iBlankEvents = iBlankEvents; 970 psSwapChain->iBlankEvents = iBlankEvents;
975 if (eMode == OMAPLFB_UPDATE_MODE_AUTO) 971 psSwapChain->bNotVSynced = !WaitForVSyncSettle(psDevInfo);
976 {
977 psSwapChain->bNotVSynced = !WaitForVSyncSettle(psDevInfo);
978 }
979 } else if (psBuffer->ulSwapInterval != 0) 972 } else if (psBuffer->ulSwapInterval != 0)
980 { 973 {
981 psSwapChain->bNotVSynced = !OMAPLFBWaitForVSync(psDevInfo); 974 psSwapChain->bNotVSynced = !OMAPLFBWaitForVSync(psDevInfo);
diff --git a/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c b/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c
index 2374784..c8072f5 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c
@@ -106,11 +106,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
106 * OmapZoom.org OMAP4 2.6.34 kernel tree - Needs plat/vrfb.h 106 * OmapZoom.org OMAP4 2.6.34 kernel tree - Needs plat/vrfb.h
107 * Sholes 2.6.32 kernel tree - Needs plat/vrfb.h 107 * Sholes 2.6.32 kernel tree - Needs plat/vrfb.h
108 */ 108 */
109#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) 109#if defined(SYS_OMAP5_UEVM)
110#define PVR_OMAPFB3_OMAP5_UEVM
111#endif
112
113#if defined(PVR_OMAPFB3_OMAP5_UEVM)
110#define PVR_OMAPFB3_NEEDS_VIDEO_OMAPVRFB_H 114#define PVR_OMAPFB3_NEEDS_VIDEO_OMAPVRFB_H
111#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) 115#else
116#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
112#define PVR_OMAPFB3_NEEDS_PLAT_VRFB_H 117#define PVR_OMAPFB3_NEEDS_PLAT_VRFB_H
113#endif 118#endif
119#endif
114 120
115#if defined(PVR_OMAPFB3_NEEDS_VIDEO_OMAPVRFB_H) 121#if defined(PVR_OMAPFB3_NEEDS_VIDEO_OMAPVRFB_H)
116#include <video/omapvrfb.h> 122#include <video/omapvrfb.h>
@@ -141,11 +147,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
141 147
142#if defined(CONFIG_DSSCOMP) 148#if defined(CONFIG_DSSCOMP)
143#if defined(CONFIG_DRM_OMAP_DMM_TILER) 149#if defined(CONFIG_DRM_OMAP_DMM_TILER)
144#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
145#include <../drivers/gpu/drm/omapdrm/omap_dmm_tiler.h>
146#else
147#include <../drivers/staging/omapdrm/omap_dmm_tiler.h> 150#include <../drivers/staging/omapdrm/omap_dmm_tiler.h>
148#endif
149#include <../drivers/video/omap2/dsscomp/tiler-utils.h> 151#include <../drivers/video/omap2/dsscomp/tiler-utils.h>
150#elif defined(CONFIG_TI_TILER) 152#elif defined(CONFIG_TI_TILER)
151#include <mach/tiler.h> 153#include <mach/tiler.h>
@@ -179,11 +181,6 @@ MODULE_SUPPORTED_DEVICE(DEVNAME);
179#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev)->output->manager 181#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev)->output->manager
180#define WAIT_FOR_VSYNC(man) ((man)->wait_for_vsync) 182#define WAIT_FOR_VSYNC(man) ((man)->wait_for_vsync)
181#else /* defined(PVR_OMAPFB3_OMAP5_UEVM) */ 183#else /* defined(PVR_OMAPFB3_OMAP5_UEVM) */
182#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
183#define OMAP_DSS_DRIVER(drv, dev) struct omap_dss_driver *drv = (dev)->driver
184#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev)->output->manager
185#define WAIT_FOR_VSYNC(man) ((man)->wait_for_vsync)
186#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
187#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) 184#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
188#define OMAP_DSS_DRIVER(drv, dev) struct omap_dss_driver *drv = (dev) != NULL ? (dev)->driver : NULL 185#define OMAP_DSS_DRIVER(drv, dev) struct omap_dss_driver *drv = (dev) != NULL ? (dev)->driver : NULL
189#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->manager : NULL 186#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->manager : NULL
@@ -193,7 +190,6 @@ MODULE_SUPPORTED_DEVICE(DEVNAME);
193#define OMAP_DSS_MANAGER(man, dev) struct omap_dss_device *man = (dev) 190#define OMAP_DSS_MANAGER(man, dev) struct omap_dss_device *man = (dev)
194#define WAIT_FOR_VSYNC(man) ((man)->wait_vsync) 191#define WAIT_FOR_VSYNC(man) ((man)->wait_vsync)
195#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ 192#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
196#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
197#endif /* defined(PVR_OMAPFB3_OMAP5_UEVM) */ 193#endif /* defined(PVR_OMAPFB3_OMAP5_UEVM) */
198#endif /* !defined(PVR_OMAPLFB_DRM_FB) */ 194#endif /* !defined(PVR_OMAPLFB_DRM_FB) */
199 195
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/ion_sys_private.h b/jacinto6/sgx_src/eurasia_km/services4/include/ion_sys_private.h
new file mode 100644
index 0000000..8b2c467
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/ion_sys_private.h
@@ -0,0 +1,50 @@
1/*************************************************************************/ /*!
2@File ion_sys_private.h
3@Title System-specific private data for ion support code
4@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5@License Dual MIT/GPLv2
6
7The contents of this file are subject to the MIT license as set out below.
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19Alternatively, the contents of this file may be used under the terms of
20the GNU General Public License Version 2 ("GPL") in which case the provisions
21of GPL are applicable instead of those above.
22
23If you wish to allow use of your version of this file only under the terms of
24GPL, and not to allow others to use your version of this file under the terms
25of the MIT license, indicate your decision by deleting the provisions above
26and replace them with the notice and other provisions required by GPL as set
27out in the file called "GPL-COPYING" included in this distribution. If you do
28not delete the provisions above, a recipient may use your version of this file
29under the terms of either the MIT license or GPL.
30
31This License is also included in this distribution in the file called
32"MIT-COPYING".
33
34EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
35PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
36BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
37PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
38COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
39IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
40CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41*/ /**************************************************************************/
42
43#include SUPPORT_ION_HEADER
44
45typedef struct
46{
47 ion_phys_addr_t uiHeapBase;
48 size_t uiHeapSize;
49 IMG_CPU_PHYADDR sPCIAddrRangeStart;
50} ION_TC_PRIVATE_DATA;
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/kerneldisplay.h b/jacinto6/sgx_src/eurasia_km/services4/include/kerneldisplay.h
index 048cb43..fe6ec15 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/include/kerneldisplay.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/kerneldisplay.h
@@ -166,6 +166,9 @@ typedef struct DISPLAYCLASS_FLIP_COMMAND_TAG
166 /* Ext SwapChain Handle */ 166 /* Ext SwapChain Handle */
167 IMG_HANDLE hExtSwapChain; 167 IMG_HANDLE hExtSwapChain;
168 168
169 /* number of vsync intervals between successive flips */
170 IMG_UINT32 ui32SwapInterval;
171
169 /* Ext Buffer Handle (Buffer to Flip to) */ 172 /* Ext Buffer Handle (Buffer to Flip to) */
170 IMG_HANDLE hExtBuffer; 173 IMG_HANDLE hExtBuffer;
171 174
@@ -178,9 +181,6 @@ typedef struct DISPLAYCLASS_FLIP_COMMAND_TAG
178 /* clip rects */ 181 /* clip rects */
179 IMG_RECT *psClipRect; 182 IMG_RECT *psClipRect;
180 183
181 /* number of vsync intervals between successive flips */
182 IMG_UINT32 ui32SwapInterval;
183
184} DISPLAYCLASS_FLIP_COMMAND; 184} DISPLAYCLASS_FLIP_COMMAND;
185 185
186 186
@@ -192,12 +192,12 @@ typedef struct DISPLAYCLASS_FLIP_COMMAND2_TAG
192 /* Ext SwapChain Handle */ 192 /* Ext SwapChain Handle */
193 IMG_HANDLE hExtSwapChain; 193 IMG_HANDLE hExtSwapChain;
194 194
195 /* Unused field, padding for compatibility with above structure */
196 IMG_HANDLE hUnused;
197
198 /* number of vsync intervals between successive flips */ 195 /* number of vsync intervals between successive flips */
199 IMG_UINT32 ui32SwapInterval; 196 IMG_UINT32 ui32SwapInterval;
200 197
198 /* Unused field, padding for compatibility with above structure */
199 IMG_HANDLE hUnused;
200
201 /* private data from userspace */ 201 /* private data from userspace */
202 IMG_PVOID pvPrivData; 202 IMG_PVOID pvPrivData;
203 203
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge.h b/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge.h
index f8e1439..8b37e39 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge.h
@@ -121,11 +121,22 @@ extern "C" {
121#define PVRSRV_BRIDGE_CHG_DEV_MEM_ATTRIBS PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+26) 121#define PVRSRV_BRIDGE_CHG_DEV_MEM_ATTRIBS PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+26)
122#define PVRSRV_BRIDGE_MAP_DEV_MEMORY_2 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+27) 122#define PVRSRV_BRIDGE_MAP_DEV_MEMORY_2 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+27)
123#define PVRSRV_BRIDGE_EXPORT_DEVICEMEM_2 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+28) 123#define PVRSRV_BRIDGE_EXPORT_DEVICEMEM_2 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+28)
124#define PVRSRV_BRIDGE_MAP_DMABUF PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+29) 124#if defined (SUPPORT_ION)
125#define PVRSRV_BRIDGE_UNMAP_DMABUF PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+30) 125#define PVRSRV_BRIDGE_MAP_ION_HANDLE PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+29)
126#define PVRSRV_BRIDGE_MAP_ION_HANDLE PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+31) 126#define PVRSRV_BRIDGE_UNMAP_ION_HANDLE PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+30)
127#define PVRSRV_BRIDGE_UNMAP_ION_HANDLE PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+32) 127#define PVRSRV_BRIDGE_ION_CMD_LAST (PVRSRV_BRIDGE_CORE_CMD_FIRST+30)
128#define PVRSRV_BRIDGE_CORE_CMD_LAST (PVRSRV_BRIDGE_CORE_CMD_FIRST+32) 128#else
129#define PVRSRV_BRIDGE_ION_CMD_LAST (PVRSRV_BRIDGE_CORE_CMD_FIRST+28)
130#endif
131#if defined (SUPPORT_DMABUF)
132#define PVRSRV_BRIDGE_DMABUF_CMD_FIRST (PVRSRV_BRIDGE_ION_CMD_LAST+1)
133#define PVRSRV_BRIDGE_MAP_DMABUF PVRSRV_IOWR(PVRSRV_BRIDGE_DMABUF_CMD_FIRST+0)
134#define PVRSRV_BRIDGE_UNMAP_DMABUF PVRSRV_IOWR(PVRSRV_BRIDGE_DMABUF_CMD_FIRST+1)
135#define PVRSRV_BRIDGE_DMABUF_CMD_LAST (PVRSRV_BRIDGE_DMABUF_CMD_FIRST+1)
136#else
137#define PVRSRV_BRIDGE_DMABUF_CMD_LAST PVRSRV_BRIDGE_ION_CMD_LAST
138#endif
139#define PVRSRV_BRIDGE_CORE_CMD_LAST PVRSRV_BRIDGE_DMABUF_CMD_LAST
129/* SIM */ 140/* SIM */
130#define PVRSRV_BRIDGE_SIM_CMD_FIRST (PVRSRV_BRIDGE_CORE_CMD_LAST+1) 141#define PVRSRV_BRIDGE_SIM_CMD_FIRST (PVRSRV_BRIDGE_CORE_CMD_LAST+1)
131#define PVRSRV_BRIDGE_PROCESS_SIMISR_EVENT PVRSRV_IOWR(PVRSRV_BRIDGE_SIM_CMD_FIRST+0) /*!< RTSIM pseudo ISR */ 142#define PVRSRV_BRIDGE_PROCESS_SIMISR_EVENT PVRSRV_IOWR(PVRSRV_BRIDGE_SIM_CMD_FIRST+0) /*!< RTSIM pseudo ISR */
@@ -531,58 +542,56 @@ typedef struct PVRSRV_BRIDGE_IN_EXPORTDEVICEMEM_TAG
531}PVRSRV_BRIDGE_IN_EXPORTDEVICEMEM; 542}PVRSRV_BRIDGE_IN_EXPORTDEVICEMEM;
532 543
533/****************************************************************************** 544/******************************************************************************
534 * 'bridge in' map dmabuf 545 * 'bridge in' map ion handle
535 *****************************************************************************/ 546 *****************************************************************************/
536#define DMABUF_IMPORT_MAX_FDS 3 547#define ION_IMPORT_MAX_FDS 3
537#define DMABUF_IMPORT_MAX_CHUNK_COUNT 3 548#define ION_IMPORT_MAX_CHUNK_COUNT 3
538typedef struct _PVRSRV_BRIDGE_IN_MAP_DMABUF_ 549typedef struct _PVRSRV_BRIDGE_IN_MAP_ION_HANDLE_
539{ 550{
540 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */ 551 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */
541 IMG_UINT32 ui32NumFDs; 552 IMG_UINT32 ui32NumFDs;
542 IMG_INT32 ai32BufferFDs[DMABUF_IMPORT_MAX_FDS]; 553 IMG_INT32 ai32BufferFDs[ION_IMPORT_MAX_FDS];
543 IMG_UINT32 ui32Attribs; 554 IMG_UINT32 ui32Attribs;
544 IMG_UINT32 ui32ChunkCount; 555 IMG_UINT32 ui32ChunkCount;
545 IMG_SIZE_T auiOffset[DMABUF_IMPORT_MAX_CHUNK_COUNT]; 556 IMG_SIZE_T auiOffset[ION_IMPORT_MAX_CHUNK_COUNT];
546 IMG_SIZE_T auiSize[DMABUF_IMPORT_MAX_CHUNK_COUNT]; 557 IMG_SIZE_T auiSize[ION_IMPORT_MAX_CHUNK_COUNT];
547 IMG_HANDLE hDevCookie; 558 IMG_HANDLE hDevCookie;
548 IMG_HANDLE hDevMemHeap; 559 IMG_HANDLE hDevMemHeap;
549} PVRSRV_BRIDGE_IN_MAP_DMABUF; 560} PVRSRV_BRIDGE_IN_MAP_ION_HANDLE;
550 561
551/****************************************************************************** 562/******************************************************************************
552 * 'bridge in' unmap dmabuf 563 * 'bridge in' unmap ion handle
553 *****************************************************************************/ 564 *****************************************************************************/
554typedef struct PVRSRV_BRIDGE_IN_UNMAP_DMABUF_TAG 565typedef struct PVRSRV_BRIDGE_IN_UNMAP_ION_HANDLE_TAG
555{ 566{
556 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */ 567 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */
557 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo; 568 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
558}PVRSRV_BRIDGE_IN_UNMAP_DMABUF; 569}PVRSRV_BRIDGE_IN_UNMAP_ION_HANDLE;
559 570
571#define DMABUF_IMPORT_MAX_FDS 3
560/****************************************************************************** 572/******************************************************************************
561 * 'bridge in' map ion handle 573 * 'bridge in' map dmabuf
562 *****************************************************************************/ 574 *****************************************************************************/
563#define ION_IMPORT_MAX_FDS 3 575typedef struct _PVRSRV_BRIDGE_IN_MAP_DMABUF_
564#define ION_IMPORT_MAX_CHUNK_COUNT 3
565typedef struct _PVRSRV_BRIDGE_IN_MAP_ION_HANDLE_
566{ 576{
567 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */ 577 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */
568 IMG_UINT32 ui32NumFDs; 578 IMG_UINT32 ui32NumFDs;
569 IMG_INT32 ai32BufferFDs[ION_IMPORT_MAX_FDS]; 579 IMG_INT32 ai32FD[DMABUF_IMPORT_MAX_FDS];
580 IMG_SIZE_T auiOffset[DMABUF_IMPORT_MAX_FDS];
581 IMG_SIZE_T auiSize[DMABUF_IMPORT_MAX_FDS];
570 IMG_UINT32 ui32Attribs; 582 IMG_UINT32 ui32Attribs;
571 IMG_UINT32 ui32ChunkCount;
572 IMG_SIZE_T auiOffset[ION_IMPORT_MAX_CHUNK_COUNT];
573 IMG_SIZE_T auiSize[ION_IMPORT_MAX_CHUNK_COUNT];
574 IMG_HANDLE hDevCookie; 583 IMG_HANDLE hDevCookie;
575 IMG_HANDLE hDevMemHeap; 584 IMG_HANDLE hDevMemHeap;
576} PVRSRV_BRIDGE_IN_MAP_ION_HANDLE; 585} PVRSRV_BRIDGE_IN_MAP_DMABUF;
577 586
578/****************************************************************************** 587/******************************************************************************
579 * 'bridge in' unmap ion handle 588 * 'bridge in' unmap dmabuf
580 *****************************************************************************/ 589 *****************************************************************************/
581typedef struct PVRSRV_BRIDGE_IN_UNMAP_ION_HANDLE_TAG 590typedef struct PVRSRV_BRIDGE_IN_UNMAP_DMABUF_TAG
582{ 591{
583 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */ 592 IMG_UINT32 ui32BridgeFlags; /* Must be first member of structure */
584 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo; 593 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
585}PVRSRV_BRIDGE_IN_UNMAP_ION_HANDLE; 594}PVRSRV_BRIDGE_IN_UNMAP_DMABUF;
586 595
587/****************************************************************************** 596/******************************************************************************
588 * 'bridge in' get free device memory 597 * 'bridge in' get free device memory
@@ -1418,6 +1427,19 @@ typedef struct PVRSRV_BRIDGE_OUT_ALLOCDEVICEMEM_TAG
1418 1427
1419 1428
1420/****************************************************************************** 1429/******************************************************************************
1430 * 'bridge out' free device memory
1431 *****************************************************************************/
1432typedef struct PVRSRV_BRIDGE_OUT_FREEDEVICEMEM_TAG
1433{
1434 PVRSRV_ERROR eError;
1435#if defined (PVRSRV_DEVMEM_TIME_STATS)
1436 IMG_UINT32 ui32TimeToDevUnmap;
1437#endif
1438
1439} PVRSRV_BRIDGE_OUT_FREEDEVICEMEM;
1440
1441
1442/******************************************************************************
1421 * 'bridge out' export device memory 1443 * 'bridge out' export device memory
1422 *****************************************************************************/ 1444 *****************************************************************************/
1423typedef struct PVRSRV_BRIDGE_OUT_EXPORTDEVICEMEM_TAG 1445typedef struct PVRSRV_BRIDGE_OUT_EXPORTDEVICEMEM_TAG
@@ -1432,31 +1454,30 @@ typedef struct PVRSRV_BRIDGE_OUT_EXPORTDEVICEMEM_TAG
1432 1454
1433 1455
1434/****************************************************************************** 1456/******************************************************************************
1435 * 'bridge out' map dmabuf 1457 * 'bridge out' map ion handle
1436 *****************************************************************************/ 1458 *****************************************************************************/
1437typedef struct _PVRSRV_BRIDGE_OUT_MAP_DMABUF_ 1459typedef struct _PVRSRV_BRIDGE_OUT_MAP_ION_HANDLE_
1438{ 1460{
1439 PVRSRV_ERROR eError; 1461 PVRSRV_ERROR eError;
1440 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo; 1462 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
1441 PVRSRV_CLIENT_MEM_INFO sClientMemInfo; 1463 PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
1442 PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo; 1464 PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
1443 IMG_SIZE_T uiDmabufBufferSize; 1465 IMG_SIZE_T uiIonBufferSize;
1444 1466
1445} PVRSRV_BRIDGE_OUT_MAP_DMABUF; 1467} PVRSRV_BRIDGE_OUT_MAP_ION_HANDLE;
1446 1468
1447/****************************************************************************** 1469/******************************************************************************
1448 * 'bridge out' map ion handle 1470 * 'bridge out' map dmabuf
1449 *****************************************************************************/ 1471 *****************************************************************************/
1450typedef struct _PVRSRV_BRIDGE_OUT_MAP_ION_HANDLE_ 1472typedef struct _PVRSRV_BRIDGE_OUT_MAP_DMABUF_
1451{ 1473{
1452 PVRSRV_ERROR eError; 1474 PVRSRV_ERROR eError;
1453 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo; 1475 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
1454 PVRSRV_CLIENT_MEM_INFO sClientMemInfo; 1476 PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
1455 PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo; 1477 PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
1456 IMG_SIZE_T uiIonBufferSize; 1478 IMG_SIZE_T uiSize;
1457 1479 IMG_SIZE_T auiOffset[DMABUF_IMPORT_MAX_FDS];
1458} PVRSRV_BRIDGE_OUT_MAP_ION_HANDLE; 1480} PVRSRV_BRIDGE_OUT_MAP_DMABUF;
1459
1460 1481
1461/****************************************************************************** 1482/******************************************************************************
1462 * 'bridge out' map meminfo to user mode 1483 * 'bridge out' map meminfo to user mode
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge_km.h b/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge_km.h
index 28c1268..d93e530 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge_km.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge_km.h
@@ -145,9 +145,9 @@ IMG_IMPORT
145PVRSRV_ERROR IMG_CALLCONV PVRSRVFreeDeviceMemKM(IMG_HANDLE hDevCookie, 145PVRSRV_ERROR IMG_CALLCONV PVRSRVFreeDeviceMemKM(IMG_HANDLE hDevCookie,
146 PVRSRV_KERNEL_MEM_INFO *psMemInfo); 146 PVRSRV_KERNEL_MEM_INFO *psMemInfo);
147 147
148#if defined(SUPPORT_DRM_GEM) 148#if defined(SUPPORT_ION)
149IMG_IMPORT 149IMG_IMPORT
150PVRSRV_ERROR PVRSRVMapDmabufKM(PVRSRV_PER_PROCESS_DATA *psPerProc, 150PVRSRV_ERROR PVRSRVMapIonHandleKM(PVRSRV_PER_PROCESS_DATA *psPerProc,
151 IMG_HANDLE hDevCookie, 151 IMG_HANDLE hDevCookie,
152 IMG_HANDLE hDevMemHeap, 152 IMG_HANDLE hDevMemHeap,
153 IMG_UINT32 ui32NumFDs, 153 IMG_UINT32 ui32NumFDs,
@@ -161,27 +161,27 @@ PVRSRV_ERROR PVRSRVMapDmabufKM(PVRSRV_PER_PROCESS_DATA *psPerProc,
161 IMG_UINT64 *pui64Stamp); 161 IMG_UINT64 *pui64Stamp);
162 162
163IMG_IMPORT 163IMG_IMPORT
164PVRSRV_ERROR IMG_CALLCONV PVRSRVUnmapDmabufKM(PVRSRV_KERNEL_MEM_INFO *psMemInfo); 164PVRSRV_ERROR IMG_CALLCONV PVRSRVUnmapIonHandleKM(PVRSRV_KERNEL_MEM_INFO *psMemInfo);
165#endif /* SUPPORT_DRM_GEM */ 165#endif /* SUPPORT_ION */
166 166
167#if defined(SUPPORT_ION) 167#if defined(SUPPORT_DMABUF)
168IMG_IMPORT 168IMG_IMPORT
169PVRSRV_ERROR PVRSRVMapIonHandleKM(PVRSRV_PER_PROCESS_DATA *psPerProc, 169PVRSRV_ERROR PVRSRVMapDmaBufKM(PVRSRV_PER_PROCESS_DATA *psPerProc,
170 IMG_HANDLE hDevCookie, 170 IMG_HANDLE hDevCookie,
171 IMG_HANDLE hDevMemHeap, 171 IMG_HANDLE hDevMemHeap,
172 IMG_UINT32 ui32NumFDs,
173 IMG_INT32 *pai32BufferFDs,
174 IMG_UINT32 ui32Flags, 172 IMG_UINT32 ui32Flags,
175 IMG_UINT32 ui32ChunkCount, 173 IMG_UINT32 ui32NumFDs,
176 IMG_SIZE_T *pauiOffset, 174 IMG_INT32 *pui32DmaBufFD,
177 IMG_SIZE_T *pauiSize, 175 IMG_SIZE_T *puiDmaBufOffset,
178 IMG_SIZE_T *puiIonBufferSize, 176 IMG_SIZE_T *puiDmaBufSize,
179 PVRSRV_KERNEL_MEM_INFO **ppsKernelMemInfo, 177 PVRSRV_KERNEL_MEM_INFO **ppsKernelMemInfo,
178 IMG_SIZE_T *puiSize,
179 IMG_SIZE_T *puiMemInfoOffset,
180 IMG_UINT64 *pui64Stamp); 180 IMG_UINT64 *pui64Stamp);
181 181
182IMG_IMPORT 182IMG_IMPORT
183PVRSRV_ERROR IMG_CALLCONV PVRSRVUnmapIonHandleKM(PVRSRV_KERNEL_MEM_INFO *psMemInfo); 183PVRSRV_ERROR IMG_CALLCONV PVRSRVUnmapDmaBufKM(PVRSRV_KERNEL_MEM_INFO *psMemInfo);
184#endif /* SUPPORT_ION */ 184#endif /* SUPPORT_DMABUF */
185 185
186IMG_IMPORT 186IMG_IMPORT
187PVRSRV_ERROR IMG_CALLCONV PVRSRVDissociateDeviceMemKM(IMG_HANDLE hDevCookie, 187PVRSRV_ERROR IMG_CALLCONV PVRSRVDissociateDeviceMemKM(IMG_HANDLE hDevCookie,
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/servicesint.h b/jacinto6/sgx_src/eurasia_km/services4/include/servicesint.h
index 4e16475..fa3c0b2 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/include/servicesint.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/servicesint.h
@@ -152,7 +152,11 @@ typedef struct _PVRSRV_KERNEL_MEM_INFO_
152 /* ptr to associated kernel sync info - NULL if no sync */ 152 /* ptr to associated kernel sync info - NULL if no sync */
153 struct _PVRSRV_KERNEL_SYNC_INFO_ *psKernelSyncInfo; 153 struct _PVRSRV_KERNEL_SYNC_INFO_ *psKernelSyncInfo;
154 154
155 IMG_HANDLE hExternalSyncInfo; 155 IMG_HANDLE hIonSyncInfo;
156
157#if defined(SUPPORT_DMABUF)
158 IMG_HANDLE hDmaBufSyncInfo;
159#endif
156 160
157 PVRSRV_MEMTYPE memType; 161 PVRSRV_MEMTYPE memType;
158 162
@@ -186,6 +190,10 @@ typedef struct _PVRSRV_KERNEL_MEM_INFO_
186#if defined (MEM_TRACK_INFO_DEBUG) 190#if defined (MEM_TRACK_INFO_DEBUG)
187 IMG_CHAR heapId[128]; 191 IMG_CHAR heapId[128];
188#endif 192#endif
193#if defined (PVRSRV_DEVMEM_TIME_STATS)
194 IMG_UINT32 ui32TimeToDevMap;
195 IMG_UINT32 *pui32TimeToDevUnmap; /* API user to provide space for storing "unmap" time */
196#endif
189} PVRSRV_KERNEL_MEM_INFO; 197} PVRSRV_KERNEL_MEM_INFO;
190 198
191 199
@@ -220,6 +228,9 @@ typedef struct _PVRSRV_KERNEL_SYNC_INFO_
220 /* Unique ID of the sync object */ 228 /* Unique ID of the sync object */
221 IMG_UINT32 ui32UID; 229 IMG_UINT32 ui32UID;
222 230
231#if defined(SUPPORT_DMABUF)
232 IMG_HANDLE hFenceContext;
233#endif
223 /* Pointer for list manager */ 234 /* Pointer for list manager */
224 struct _PVRSRV_KERNEL_SYNC_INFO_ *psNext; 235 struct _PVRSRV_KERNEL_SYNC_INFO_ *psNext;
225 struct _PVRSRV_KERNEL_SYNC_INFO_ **ppsThis; 236 struct _PVRSRV_KERNEL_SYNC_INFO_ **ppsThis;
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/sgx_mkif_km.h b/jacinto6/sgx_src/eurasia_km/services4/include/sgx_mkif_km.h
index baab80d..2defa73 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/include/sgx_mkif_km.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/sgx_mkif_km.h
@@ -91,7 +91,7 @@ typedef struct _PVRSRV_SGX_KERNEL_CCB_
91 *****************************************************************************/ 91 *****************************************************************************/
92typedef struct _PVRSRV_SGX_CCB_CTL_ 92typedef struct _PVRSRV_SGX_CCB_CTL_
93{ 93{
94 IMG_UINT32 ui32WriteOffset; /*!< write offset into array of commands (MUST be alligned to 16 bytes!) */ 94 IMG_UINT32 ui32WriteOffset; /*!< write offset into array of commands (MUST be aligned to 16 bytes!) */
95 IMG_UINT32 ui32ReadOffset; /*!< read offset into array of commands */ 95 IMG_UINT32 ui32ReadOffset; /*!< read offset into array of commands */
96} PVRSRV_SGX_CCB_CTL; 96} PVRSRV_SGX_CCB_CTL;
97 97
@@ -177,19 +177,9 @@ typedef struct _SGXMKIF_CMDTA_SHARED_
177 /* sync criteria used for TA/3D dependency synchronisation */ 177 /* sync criteria used for TA/3D dependency synchronisation */
178 PVRSRV_DEVICE_SYNC_OBJECT sTA3DDependency; 178 PVRSRV_DEVICE_SYNC_OBJECT sTA3DDependency;
179 179
180#if defined(SUPPORT_SGX_GENERALISED_SYNCOBJECTS)
181 /* SRC and DST syncs */
182 IMG_UINT32 ui32NumTASrcSyncs;
183 PVRSRV_DEVICE_SYNC_OBJECT asTASrcSyncs[SGX_MAX_TA_SRC_SYNCS];
184 IMG_UINT32 ui32NumTADstSyncs;
185 PVRSRV_DEVICE_SYNC_OBJECT asTADstSyncs[SGX_MAX_TA_DST_SYNCS];
186 IMG_UINT32 ui32Num3DSrcSyncs;
187 PVRSRV_DEVICE_SYNC_OBJECT as3DSrcSyncs[SGX_MAX_3D_SRC_SYNCS];
188#else
189 /* source dependency details */ 180 /* source dependency details */
190 IMG_UINT32 ui32NumSrcSyncs; 181 IMG_UINT32 ui32NumSrcSyncs;
191 PVRSRV_DEVICE_SYNC_OBJECT asSrcSyncs[SGX_MAX_SRC_SYNCS_TA]; 182 PVRSRV_DEVICE_SYNC_OBJECT asSrcSyncs[SGX_MAX_SRC_SYNCS_TA];
192#endif
193 183
194 CTL_STATUS sCtlTAStatusInfo[SGX_MAX_TA_STATUS_VALS]; 184 CTL_STATUS sCtlTAStatusInfo[SGX_MAX_TA_STATUS_VALS];
195 CTL_STATUS sCtl3DStatusInfo[SGX_MAX_3D_STATUS_VALS]; 185 CTL_STATUS sCtl3DStatusInfo[SGX_MAX_3D_STATUS_VALS];
@@ -293,8 +283,8 @@ typedef struct _SGXMKIF_HWDEVICE_SYNC_LIST_
293 *****************************************************************************/ 283 *****************************************************************************/
294#define PVRSRV_USSE_EDM_POWMAN_IDLE_COMPLETE (1UL << 2) /*!< Signal from ukernel->Host indicating SGX is idle */ 284#define PVRSRV_USSE_EDM_POWMAN_IDLE_COMPLETE (1UL << 2) /*!< Signal from ukernel->Host indicating SGX is idle */
295#define PVRSRV_USSE_EDM_POWMAN_POWEROFF_COMPLETE (1UL << 3) /*!< Signal from ukernel->Host indicating SGX can be powered down */ 285#define PVRSRV_USSE_EDM_POWMAN_POWEROFF_COMPLETE (1UL << 3) /*!< Signal from ukernel->Host indicating SGX can be powered down */
296#define PVRSRV_USSE_EDM_POWMAN_POWEROFF_RESTART_IMMEDIATE (1UL << 4) /*!< Signal from ukernel->Host indicating there is work to do immediately */ 286#define PVRSRV_USSE_EDM_POWMAN_POWEROFF_RESTART_IMMEDIATE (1UL << 4) /*!< Signal from ukernel->Host indicating there is work to be done immediately */
297#define PVRSRV_USSE_EDM_POWMAN_NO_WORK (1UL << 5) /*!< Signal from ukernel->Host indicating no work to do */ 287#define PVRSRV_USSE_EDM_POWMAN_NO_WORK (1UL << 5) /*!< Signal from ukernel->Host indicating nothing to do */
298 288
299/*! 289/*!
300 ***************************************************************************** 290 *****************************************************************************
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/sgx_ukernel_status_codes.h b/jacinto6/sgx_src/eurasia_km/services4/include/sgx_ukernel_status_codes.h
index e8c1626..75f186d 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/include/sgx_ukernel_status_codes.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/sgx_ukernel_status_codes.h
@@ -261,6 +261,11 @@ MKTC_ST(MKTC_KICKTA_CHKPT_RESET_COMPLETE)
261#define MKTC_KICKTA_CHKPT_CHECK_SWITCH 0xAD0008A6 261#define MKTC_KICKTA_CHKPT_CHECK_SWITCH 0xAD0008A6
262MKTC_ST(MKTC_KICKTA_CHKPT_CHECK_SWITCH) 262MKTC_ST(MKTC_KICKTA_CHKPT_CHECK_SWITCH)
263 263
264#define MKTC_KICK_MEM_BURSTER_WA_VDM_START 0xAD0008B1
265MKTC_ST(MKTC_KICK_MEM_BURSTER_WA_VDM_START)
266#define MKTC_TAFINISHED_MEM_BURSTER_WA 0xAD0008B2
267MKTC_ST(MKTC_TAFINISHED_MEM_BURSTER_WA)
268
264#define MKTC_HOSTKICK_START 0xAD000900 269#define MKTC_HOSTKICK_START 0xAD000900
265MKTC_ST(MKTC_HOSTKICK_START) 270MKTC_ST(MKTC_HOSTKICK_START)
266#define MKTC_HOSTKICK_END 0xAD000901 271#define MKTC_HOSTKICK_END 0xAD000901
diff --git a/jacinto6/sgx_src/eurasia_km/services4/include/sgxinfo.h b/jacinto6/sgx_src/eurasia_km/services4/include/sgxinfo.h
index 7ffdbc7..513cf3d 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/include/sgxinfo.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/include/sgxinfo.h
@@ -142,6 +142,9 @@ typedef struct _SGX_BRIDGE_INIT_INFO_
142 IMG_UINT32 ui32MasterClkGateStatus2Mask; 142 IMG_UINT32 ui32MasterClkGateStatus2Mask;
143#endif /* SGX_FEATURE_MP */ 143#endif /* SGX_FEATURE_MP */
144 144
145#if defined(SGX_FEATURE_AUTOCLOCKGATING)
146 IMG_BOOL bDisableClockGating;
147#endif
145 IMG_UINT32 ui32CacheControl; 148 IMG_UINT32 ui32CacheControl;
146 149
147 IMG_UINT32 asInitDevData[SGX_MAX_DEV_DATA]; 150 IMG_UINT32 asInitDevData[SGX_MAX_DEV_DATA];
@@ -206,19 +209,9 @@ typedef struct _SGX_CCB_KICK_
206 /* CCB offset of data structure associated with this kick */ 209 /* CCB offset of data structure associated with this kick */
207 IMG_UINT32 ui32CCBOffset; 210 IMG_UINT32 ui32CCBOffset;
208 211
209#if defined(SUPPORT_SGX_GENERALISED_SYNCOBJECTS)
210 /* SRC and DST syncs */
211 IMG_UINT32 ui32NumTASrcSyncs;
212 IMG_HANDLE ahTASrcKernelSyncInfo[SGX_MAX_TA_SRC_SYNCS];
213 IMG_UINT32 ui32NumTADstSyncs;
214 IMG_HANDLE ahTADstKernelSyncInfo[SGX_MAX_TA_DST_SYNCS];
215 IMG_UINT32 ui32Num3DSrcSyncs;
216 IMG_HANDLE ah3DSrcKernelSyncInfo[SGX_MAX_3D_SRC_SYNCS];
217#else
218 /* SRC syncs */ 212 /* SRC syncs */
219 IMG_UINT32 ui32NumSrcSyncs; 213 IMG_UINT32 ui32NumSrcSyncs;
220 IMG_HANDLE ahSrcKernelSyncInfo[SGX_MAX_SRC_SYNCS_TA]; 214 IMG_HANDLE ahSrcKernelSyncInfo[SGX_MAX_SRC_SYNCS_TA];
221#endif
222 215
223 /* TA/3D dependency data */ 216 /* TA/3D dependency data */
224 IMG_BOOL bTADependency; 217 IMG_BOOL bTADependency;
@@ -269,7 +262,6 @@ typedef struct _SGX_CLIENT_INFO_
269 *****************************************************************************/ 262 *****************************************************************************/
270typedef struct _SGX_INTERNAL_DEVINFO_ 263typedef struct _SGX_INTERNAL_DEVINFO_
271{ 264{
272 IMG_UINT32 ui32Flags;
273 IMG_HANDLE hHostCtlKernelMemInfoHandle; 265 IMG_HANDLE hHostCtlKernelMemInfoHandle;
274 IMG_BOOL bForcePTOff; 266 IMG_BOOL bForcePTOff;
275} SGX_INTERNAL_DEVINFO; 267} SGX_INTERNAL_DEVINFO;
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c
index 40c969c..4a1a758 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c
@@ -89,10 +89,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
89 89
90 90
91#if defined(PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC) 91#if defined(PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC)
92#include <linux/fcntl.h>
92#include <linux/file.h> 93#include <linux/file.h>
93#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0))
94#include <asm/fcntl.h>
95#endif
96#include <linux/version.h> 94#include <linux/version.h>
97#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)) 95#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
98#include <linux/sync.h> 96#include <linux/sync.h>
@@ -667,7 +665,9 @@ PVRSRVAllocDeviceMemBW(IMG_UINT32 ui32BridgeID,
667 psAllocDeviceMemOUT->sClientMemInfo.ui32Flags = psMemInfo->ui32Flags; 665 psAllocDeviceMemOUT->sClientMemInfo.ui32Flags = psMemInfo->ui32Flags;
668 psAllocDeviceMemOUT->sClientMemInfo.uAllocSize = psMemInfo->uAllocSize; 666 psAllocDeviceMemOUT->sClientMemInfo.uAllocSize = psMemInfo->uAllocSize;
669 psAllocDeviceMemOUT->sClientMemInfo.hMappingInfo = psMemInfo->sMemBlk.hOSMemHandle; 667 psAllocDeviceMemOUT->sClientMemInfo.hMappingInfo = psMemInfo->sMemBlk.hOSMemHandle;
670 668#if defined (PVRSRV_DEVMEM_TIME_STATS)
669 psAllocDeviceMemOUT->sClientMemInfo.sDevMemTimingStats.sDevMemMapTimes.ui32TimeToDevMap = psMemInfo->ui32TimeToDevMap;
670#endif
671 PVRSRVAllocHandleNR(psPerProc->psHandleBase, 671 PVRSRVAllocHandleNR(psPerProc->psHandleBase,
672 &psAllocDeviceMemOUT->sClientMemInfo.hKernelMemInfo, 672 &psAllocDeviceMemOUT->sClientMemInfo.hKernelMemInfo,
673 psMemInfo, 673 psMemInfo,
@@ -722,43 +722,54 @@ PVRSRVAllocDeviceMemBW(IMG_UINT32 ui32BridgeID,
722static IMG_INT 722static IMG_INT
723PVRSRVFreeDeviceMemBW(IMG_UINT32 ui32BridgeID, 723PVRSRVFreeDeviceMemBW(IMG_UINT32 ui32BridgeID,
724 PVRSRV_BRIDGE_IN_FREEDEVICEMEM *psFreeDeviceMemIN, 724 PVRSRV_BRIDGE_IN_FREEDEVICEMEM *psFreeDeviceMemIN,
725 PVRSRV_BRIDGE_RETURN *psRetOUT, 725 PVRSRV_BRIDGE_OUT_FREEDEVICEMEM *psFreeDeviceMemOUT,
726 PVRSRV_PER_PROCESS_DATA *psPerProc) 726 PVRSRV_PER_PROCESS_DATA *psPerProc)
727{ 727{
728 IMG_HANDLE hDevCookieInt; 728 IMG_HANDLE hDevCookieInt;
729 IMG_VOID *pvKernelMemInfo; 729 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
730#if defined (PVRSRV_DEVMEM_TIME_STATS)
731 IMG_UINT32 ui32TimeToDevUnmap;
732#endif
730 733
731 PVRSRV_BRIDGE_ASSERT_CMD(ui32BridgeID, PVRSRV_BRIDGE_FREE_DEVICEMEM); 734 PVRSRV_BRIDGE_ASSERT_CMD(ui32BridgeID, PVRSRV_BRIDGE_FREE_DEVICEMEM);
732 735
733 psRetOUT->eError = 736 psFreeDeviceMemOUT->eError =
734 PVRSRVLookupHandle(psPerProc->psHandleBase, &hDevCookieInt, 737 PVRSRVLookupHandle(psPerProc->psHandleBase, &hDevCookieInt,
735 psFreeDeviceMemIN->hDevCookie, 738 psFreeDeviceMemIN->hDevCookie,
736 PVRSRV_HANDLE_TYPE_DEV_NODE); 739 PVRSRV_HANDLE_TYPE_DEV_NODE);
737 740
738 if(psRetOUT->eError != PVRSRV_OK) 741 if(psFreeDeviceMemOUT->eError != PVRSRV_OK)
739 { 742 {
740 return 0; 743 return 0;
741 } 744 }
742 745
743 psRetOUT->eError = 746 psFreeDeviceMemOUT->eError =
744 PVRSRVLookupHandle(psPerProc->psHandleBase, 747 PVRSRVLookupHandle(psPerProc->psHandleBase,
745 &pvKernelMemInfo, 748 (IMG_PVOID *)&psKernelMemInfo,
746 psFreeDeviceMemIN->psKernelMemInfo, 749 psFreeDeviceMemIN->psKernelMemInfo,
747 PVRSRV_HANDLE_TYPE_MEM_INFO); 750 PVRSRV_HANDLE_TYPE_MEM_INFO);
748 751
749 if(psRetOUT->eError != PVRSRV_OK) 752 if(psFreeDeviceMemOUT->eError != PVRSRV_OK)
750 { 753 {
751 return 0; 754 return 0;
752 } 755 }
753 756
754 psRetOUT->eError = PVRSRVFreeDeviceMemKM(hDevCookieInt, pvKernelMemInfo); 757#if defined (PVRSRV_DEVMEM_TIME_STATS)
758 psKernelMemInfo->pui32TimeToDevUnmap = &ui32TimeToDevUnmap;
759#endif
755 760
756 if(psRetOUT->eError != PVRSRV_OK) 761 psFreeDeviceMemOUT->eError = PVRSRVFreeDeviceMemKM(hDevCookieInt, psKernelMemInfo);
762
763 if(psFreeDeviceMemOUT->eError != PVRSRV_OK)
757 { 764 {
758 return 0; 765 return 0;
759 } 766 }
760 767
761 psRetOUT->eError = 768#if defined (PVRSRV_DEVMEM_TIME_STATS)
769 psFreeDeviceMemOUT->ui32TimeToDevUnmap = ui32TimeToDevUnmap;
770#endif
771
772 psFreeDeviceMemOUT->eError =
762 PVRSRVReleaseHandle(psPerProc->psHandleBase, 773 PVRSRVReleaseHandle(psPerProc->psHandleBase,
763 psFreeDeviceMemIN->psKernelMemInfo, 774 psFreeDeviceMemIN->psKernelMemInfo,
764 PVRSRV_HANDLE_TYPE_MEM_INFO); 775 PVRSRV_HANDLE_TYPE_MEM_INFO);
@@ -1395,301 +1406,306 @@ PVRSRVUnwrapExtMemoryBW(IMG_UINT32 ui32BridgeID,
1395 return 0; 1406 return 0;
1396} 1407}
1397 1408
1398#if defined(SUPPORT_DRM_GEM) 1409#if defined(SUPPORT_ION)
1399static IMG_INT 1410static IMG_INT
1400PVRSRVMapDmabufBW(IMG_UINT32 ui32BridgeID, 1411PVRSRVMapIonHandleBW(IMG_UINT32 ui32BridgeID,
1401 PVRSRV_BRIDGE_IN_MAP_DMABUF *psMapDmabufIN, 1412 PVRSRV_BRIDGE_IN_MAP_ION_HANDLE *psMapIonIN,
1402 PVRSRV_BRIDGE_OUT_MAP_DMABUF *psMapDmabufOUT, 1413 PVRSRV_BRIDGE_OUT_MAP_ION_HANDLE *psMapIonOUT,
1403 PVRSRV_PER_PROCESS_DATA *psPerProc) 1414 PVRSRV_PER_PROCESS_DATA *psPerProc)
1404{ 1415{
1405 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo; 1416 PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
1406 IMG_UINT64 ui64Stamp; 1417 IMG_UINT64 ui64Stamp;
1407 1418
1408 psMapDmabufOUT->eError = PVRSRVLookupHandle(psPerProc->psHandleBase, 1419 psMapIonOUT->eError = PVRSRVLookupHandle(psPerProc->psHandleBase,
1409 &psMapDmabufIN->hDevCookie, 1420 &psMapIonIN->hDevCookie,
1410 psMapDmabufIN->hDevCookie, 1421 psMapIonIN->hDevCookie,
1411 PVRSRV_HANDLE_TYPE_DEV_NODE); 1422 PVRSRV_HANDLE_TYPE_DEV_NODE);
1412 if (psMapDmabufOUT->eError != PVRSRV_OK) 1423 if (psMapIonOUT->eError != PVRSRV_OK)
1413 { 1424 {
1414 PVR_DPF((PVR_DBG_ERROR, "%s: Failed to lookup device node handle", __FUNCTION__)); 1425 PVR_DPF((PVR_DBG_ERROR, "%s: Failed to lookup device node handle", __FUNCTION__));
1415 return 0; 1426 return 0;
1416 } 1427 }
1417 1428
1418 psMapDmabufOUT->eError = PVRSRVLookupHandle(psPerProc->psHandleBase, 1429 psMapIonOUT->eError = PVRSRVLookupHandle(psPerProc->psHandleBase,
1419 &psMapDmabufIN->hDevMemHeap, 1430 &psMapIonIN->hDevMemHeap,
1420 psMapDmabufIN->hDevMemHeap, 1431 psMapIonIN->hDevMemHeap,
1421 PVRSRV_HANDLE_TYPE_DEV_MEM_HEAP); 1432 PVRSRV_HANDLE_TYPE_DEV_MEM_HEAP);
1422 if (psMapDmabufOUT->eError != PVRSRV_OK) 1433 if (psMapIonOUT->eError != PVRSRV_OK)
1423 { 1434 {
1424 PVR_DPF((PVR_DBG_ERROR, "%s: Failed to lookup memory context handle", __FUNCTION__)); 1435 PVR_DPF((PVR_DBG_ERROR, "%s: Failed to lookup memory context handle", __FUNCTION__));
1425 return 0; 1436 return 0;
1426 } 1437 }
1427 1438
1428 psMapDmabufOUT->eError = PVRSRVMapDmabufKM(psPerProc, 1439 psMapIonOUT->eError = PVRSRVMapIonHandleKM(psPerProc,
1429 psMapDmabufIN->hDevCookie, 1440 psMapIonIN->hDevCookie,
1430 psMapDmabufIN->hDevMemHeap, 1441 psMapIonIN->hDevMemHeap,
1431 psMapDmabufIN->ui32NumFDs, 1442 psMapIonIN->ui32NumFDs,
1432 psMapDmabufIN->ai32BufferFDs, 1443 psMapIonIN->ai32BufferFDs,
1433 psMapDmabufIN->ui32Attribs, 1444 psMapIonIN->ui32Attribs,
1434 psMapDmabufIN->ui32ChunkCount, 1445 psMapIonIN->ui32ChunkCount,
1435 psMapDmabufIN->auiOffset, 1446 psMapIonIN->auiOffset,
1436 psMapDmabufIN->auiSize, 1447 psMapIonIN->auiSize,
1437 &psMapDmabufOUT->uiDmabufBufferSize, 1448 &psMapIonOUT->uiIonBufferSize,
1438 &psKernelMemInfo, 1449 &psKernelMemInfo,
1439 &ui64Stamp); 1450 &ui64Stamp);
1440 if (psMapDmabufOUT->eError != PVRSRV_OK) 1451 if (psMapIonOUT->eError != PVRSRV_OK)
1441 { 1452 {
1442 PVR_DPF((PVR_DBG_ERROR, "%s: Failed to map ion handle", __FUNCTION__)); 1453 PVR_DPF((PVR_DBG_ERROR, "%s: Failed to map ion handle", __FUNCTION__));
1443 return 0; 1454 return 0;
1444 } 1455 }
1445 1456
1446 OSMemSet(&psMapDmabufOUT->sClientMemInfo, 1457 OSMemSet(&psMapIonOUT->sClientMemInfo,
1447 0, 1458 0,
1448 sizeof(psMapDmabufOUT->sClientMemInfo)); 1459 sizeof(psMapIonOUT->sClientMemInfo));
1449 1460
1450 psMapDmabufOUT->sClientMemInfo.pvLinAddrKM = 1461 psMapIonOUT->sClientMemInfo.pvLinAddrKM =
1451 psKernelMemInfo->pvLinAddrKM; 1462 psKernelMemInfo->pvLinAddrKM;
1452 1463
1453 psMapDmabufOUT->sClientMemInfo.pvLinAddr = 0; 1464 psMapIonOUT->sClientMemInfo.pvLinAddr = 0;
1454 psMapDmabufOUT->sClientMemInfo.sDevVAddr = psKernelMemInfo->sDevVAddr; 1465 psMapIonOUT->sClientMemInfo.sDevVAddr = psKernelMemInfo->sDevVAddr;
1455 psMapDmabufOUT->sClientMemInfo.ui32Flags = psKernelMemInfo->ui32Flags; 1466 psMapIonOUT->sClientMemInfo.ui32Flags = psKernelMemInfo->ui32Flags;
1456 psMapDmabufOUT->sClientMemInfo.uAllocSize = psKernelMemInfo->uAllocSize; 1467 psMapIonOUT->sClientMemInfo.uAllocSize = psKernelMemInfo->uAllocSize;
1457 1468
1458 /* No mapping info, we map through ion */ 1469 /* No mapping info, we map through ion */
1459 psMapDmabufOUT->sClientMemInfo.hMappingInfo = IMG_NULL; 1470 psMapIonOUT->sClientMemInfo.hMappingInfo = IMG_NULL;
1460 1471
1461#if defined(SUPPORT_MEMINFO_IDS) 1472#if defined(SUPPORT_MEMINFO_IDS)
1462 psMapDmabufOUT->sClientMemInfo.ui64Stamp = ui64Stamp; 1473 psMapIonOUT->sClientMemInfo.ui64Stamp = ui64Stamp;
1463#endif 1474#endif
1464 1475
1465 PVRSRVAllocHandleNR(psPerProc->psHandleBase, 1476 PVRSRVAllocHandleNR(psPerProc->psHandleBase,
1466 &psMapDmabufOUT->sClientMemInfo.hKernelMemInfo, 1477 &psMapIonOUT->sClientMemInfo.hKernelMemInfo,
1467 psKernelMemInfo, 1478 psKernelMemInfo,
1468 PVRSRV_HANDLE_TYPE_MEM_INFO, 1479 PVRSRV_HANDLE_TYPE_MEM_INFO,
1469 PVRSRV_HANDLE_ALLOC_FLAG_NONE); 1480 PVRSRV_HANDLE_ALLOC_FLAG_NONE);
1470 1481
1471 if(psMapDmabufIN->ui32Attribs & PVRSRV_MEM_NO_SYNCOBJ) 1482 if(psMapIonIN->ui32Attribs & PVRSRV_MEM_NO_SYNCOBJ)
1472 { 1483 {
1473 /* signal no syncinfo */ 1484 /* signal no syncinfo */
1474<