From: Imagination Technologies/TI Date: Tue, 15 Oct 2013 22:59:10 +0000 (+0300) Subject: 1.10.2359475/4.10.00.01 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a9d609b3c1c5f6ca49d48f3b639d5233afa7484;p=sgx.git 1.10.2359475/4.10.00.01 --- diff --git a/Kbuild b/Kbuild index 47b38a2..1a7eb44 100644 --- a/Kbuild +++ b/Kbuild @@ -45,6 +45,13 @@ ifneq ($(FBDEV),no) EXTRA_CFLAGS += -DFBDEV_PRESENT endif +ifeq ($(TI_PLATFORM),ti335x) +ifneq ($(SUPPORT_XORG),1) +ifeq ($(PM_RUNTIME),1) +EXTRA_CFLAGS += -DPM_RUNTIME_SUPPORT +endif +endif +endif ifeq ($(TI_PLATFORM),ti335x) DRIFILES = services4/srvkm/env/linux/pvr_drm.c services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c services4/3rdparty/dc_ti335x_linux/omaplfb_displayclass.c @@ -66,7 +73,7 @@ EXTRA_CFLAGS += -I$(src)/services4/srvkm/env/linux EXTRA_CFLAGS += -I$(src)/services4/system/include EXTRA_CFLAGS += -I$(src)/services4/system/$(TI_PLATFORM) EXTRA_CFLAGS += -I$(src)/services4/srvkm/bridged/sgx - +EXTRA_CFLAGS += -I$(KERNELDIR)/arch/arm/mach-omap2 ifeq ($(SUPPORT_XORG),1) EXTRA_CFLAGS += -I$(KERNELDIR)/include/drm diff --git a/Makefile b/Makefile index ba1ce41..77ea3d0 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,14 @@ SUPPORT_DRI_DRM_NO_LIBDRM = 1 endif endif +ifeq ($(TI_PLATFORM),ti335x) +ifneq ($(SUPPORT_XORG),1) +ifeq ($(PM_RUNTIME),1) +PM_RUNTIME_SUPPORT = 1 +endif +endif +endif + # Only enable active power management if passive power management is # enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP, diff --git a/eurasiacon/build/linux2/bits.mk b/eurasiacon/build/linux2/bits.mk index a1a7eef..27da720 100644 --- a/eurasiacon/build/linux2/bits.mk +++ b/eurasiacon/build/linux2/bits.mk @@ -104,9 +104,11 @@ ifneq ($(filter help,$(D)),) empty := space := $(empty) $(empty) $(info Debug options) -$(info $(space)D=modules dump module info) -$(info $(space)D=freeze-config prevent config changes) -$(info $(space)D=config-changes dump diffs when config changes) -$(info Options may be combined: make D=freeze-config,config-changes) +$(info $(space)D=modules dump module info) +$(info $(space)D=config dump all config options + type and origin) +$(info $(space)D=freeze-config prevent config changes) +$(info $(space)D=config-changes dump diffs when config changes) +$(info $(space)D=nobuild stop before running the main build) +$(info Options can be combined: make D=freeze-config,config-changes) $(error D=help given) endif diff --git a/eurasiacon/build/linux2/buildvars.mk b/eurasiacon/build/linux2/buildvars.mk index 24fa829..ef37cf7 100644 --- a/eurasiacon/build/linux2/buildvars.mk +++ b/eurasiacon/build/linux2/buildvars.mk @@ -176,7 +176,7 @@ ALL_CXXFLAGS := \ $(SYS_CXXFLAGS) ALL_HOST_CXXFLAGS := \ - $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) -Wall + $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) # User C and C++ # diff --git a/eurasiacon/build/linux2/commands.mk b/eurasiacon/build/linux2/commands.mk index 25e5ed1..cfeb5df 100644 --- a/eurasiacon/build/linux2/commands.mk +++ b/eurasiacon/build/linux2/commands.mk @@ -98,7 +98,7 @@ endef define target-executable-cxx-from-o $(if $(V),,@echo " LD " $(call relative-to-top,$@)) $(CXX) \ - $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ + $(SYS_EXE_LDFLAGS_CXX) $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \ $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) endef @@ -116,11 +116,29 @@ endef define target-shared-library-cxx-from-o $(if $(V),,@echo " LD " $(call relative-to-top,$@)) $(CXX) -shared -Wl,-Bsymbolic \ - $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ + $(SYS_LIB_LDFLAGS_CXX) $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \ $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) endef +define host-shared-library-from-o +$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) +$(HOST_CC) -shared -Wl,-Bsymbolic \ + $(MODULE_HOST_LDFLAGS) -o $@ \ + $(sort $(MODULE_ALL_OBJECTS)) \ + $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) +endef + +# If there were any C++ source files in a shared library, we use this recipe, +# which runs the C++ compiler to link the final library +define host-shared-library-cxx-from-o +$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) +$(HOST_CXX) -shared -Wl,-Bsymbolic \ + $(MODULE_HOST_LDFLAGS) -o $@ \ + $(sort $(MODULE_ALL_OBJECTS)) \ + $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) +endef + define target-copy-debug-information $(OBJCOPY) --only-keep-debug $@ $(basename $@).dbg endef diff --git a/eurasiacon/build/linux2/common/dridrm.mk b/eurasiacon/build/linux2/common/dridrm.mk index 5d0289f..4097e7a 100644 --- a/eurasiacon/build/linux2/common/dridrm.mk +++ b/eurasiacon/build/linux2/common/dridrm.mk @@ -59,5 +59,3 @@ $(eval $(call TunableBothConfigMake,PVR_DRI_DRM_NOT_PCI)) $(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,)) - -export EXTERNAL_3PDD_TARBALL diff --git a/eurasiacon/build/linux2/config/core.mk b/eurasiacon/build/linux2/config/core.mk index 8eb0824..42df94f 100644 --- a/eurasiacon/build/linux2/config/core.mk +++ b/eurasiacon/build/linux2/config/core.mk @@ -56,6 +56,7 @@ # define KernelConfigMake $$(shell echo "override $(1) := $(2)" >>$(CONFIG_KERNEL_MK).new) +$(if $(filter config,$(D)),$(info KernelConfigMake $(1) := $(2) # $(if $($(1)),$(origin $(1)),default))) endef # Write out a GNU make option for both user & kernel @@ -88,6 +89,7 @@ endef # define KernelConfigC $$(shell echo "#define $(1) $(2)" >>$(CONFIG_KERNEL_H).new) +$(if $(filter config,$(D)),$(info KernelConfigC #define $(1) $(2) /* $(if $($(1)),$(origin $(1)),default) */),) endef # Write out an option for both user & kernel @@ -184,6 +186,14 @@ CONFIG_H := $(OUT)/config.h CONFIG_KERNEL_MK := $(OUT)/config_kernel.mk CONFIG_KERNEL_H := $(OUT)/config_kernel.h +# Convert commas to spaces in $(D). This is so you can say "make +# D=config-changes,freeze-config" and have $(filter config-changes,$(D)) +# still work. +comma := , +empty := +space := $(empty) $(empty) +override D := $(subst $(comma),$(space),$(D)) + # Create the OUT directory and delete any previous intermediary files # $(shell mkdir -p $(OUT)) @@ -209,6 +219,12 @@ endif # require things like SGXCORE to be set ifneq ($(INTERNAL_CLOBBER_ONLY),true) +# These are defined by the core build system, but we might need them +# earlier to feature-check the compilers +# +_CC := $(CROSS_COMPILE)$(if $(filter default,$(origin CC)),gcc,$(CC)) +HOST_CC ?= gcc + -include ../config/user-defs.mk # FIXME: Backwards compatibility remaps. @@ -271,21 +287,10 @@ override SUPPORT_HW_RECOVERY := 0 override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 endif -# We're bumping against USSE limits on older cores because the ukernel -# is too large when building both SGX_DISABLE_VISTEST_SUPPORT=0 and -# PVRSRV_USSE_EDM_STATUS_DEBUG=1. -# -# Automatically disable vistest support if debugging the ukernel to -# prevent build failures. -# -ifneq ($(filter 520 530 531 535 540,$(SGXCORE)),) -ifneq ($(SGX_DISABLE_VISTEST_SUPPORT),1) -SGX_DISABLE_VISTEST_SUPPORT ?= not-overridden -ifeq ($(SGX_DISABLE_VISTEST_SUPPORT),not-overridden) -$(warning Setting SGX_DISABLE_VISTEST_SUPPORT=1 because PVRSRV_USSE_EDM_STATUS_DEBUG=1) -SGX_DISABLE_VISTEST_SUPPORT := 1 -endif -endif +ifeq ($(SGX_FEATURE_36BIT_MMU),1) +override IMG_ADDRSPACE_PHYSADDR_BITS := 64 +else +override IMG_ADDRSPACE_PHYSADDR_BITS := 32 endif ifeq ($(SGXCORE),535) @@ -343,12 +348,12 @@ $$(warning *** Setting $(1) via $$(origin $(1)) is deprecated) $$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl") endif endef -$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SUPPORT_EWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENVG SUPPORT_OPENCL SUPPORT_OPENGL SUPPORT_UNITTESTS SUPPORT_XORG,$(eval $(call sanity-check-support-option-origin,$(_o)))) +$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS 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)))) # Check for words in EXCLUDED_APIS that aren't understood by the # common/apis/*.mk files. This should be kept in sync with all the tests on # EXCLUDED_APIS in those files -_excludable_apis := opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts +_excludable_apis := rscompute opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts _unrecognised := $(strip $(filter-out $(_excludable_apis),$(EXCLUDED_APIS))) ifneq ($(_unrecognised),) $(warning *** Unrecognised entries in EXCLUDED_APIS: $(_unrecognised)) @@ -378,8 +383,13 @@ ifneq ($(filter pvr2d,$(COMPONENTS)),) COMPONENTS += null_pvr2d_remote endif COMPONENTS += pvrvncsrv +COMPONENTS += pvrvncinput endif +$(if $(filter config,$(D)),$(info Build configuration:)) + +################################# CONFIG #################################### + # If KERNELDIR is set, write it out to the config.mk, with # KERNEL_COMPONENTS and KERNEL_ID # @@ -400,19 +410,54 @@ KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE) $(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,)) endif -# Check the KERNELDIR has a kernel built and also check that it is -# not 64-bit, which we do not support. +# Check the KERNELDIR has a kernel built. VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux)) +LINUXCFG := $(strip $(wildcard $(KERNELDIR)/.config)) + ifneq ($(VMLINUX),) -VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep -q 64-bit || echo false) +ifneq ($(shell file $(KERNELDIR)/vmlinux | grep 64-bit >/dev/null && echo 1),$(shell $(_CC) -dM -E - /dev/null && echo 1)) +$(error Attempting to build 64-bit DDK against 32-bit kernel, or 32-bit DDK against 64-bit kernel. This is not allowed.) +endif +VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep 64-bit >/dev/null || echo false) +VMLINUX_HAS_PAE36 := $(shell cat $(LINUXCFG) | grep CONFIG_X86_PAE=y >/dev/null || echo false) +VMLINUX_HAS_PAE40 := $(shell cat $(LINUXCFG) | grep CONFIG_ARM_LPAE=y >/dev/null || echo false) +VMLINUX_HAS_DMA32 := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA32=y >/dev/null || echo false) + +# $(error 64BIT=$(VMLINUX_IS_64BIT) PAE36=$(VMLINUX_HAS_PAE36) PAE40=$(VMLINUX_HAS_PAE40) DMA32=$(VMLINUX_HAS_DMA32) MMU36=$(SGX_FEATURE_36BIT_MMU)) + ifneq ($(VMLINUX_IS_64BIT),false) -$(warning $$(KERNELDIR)/vmlinux is 64-bit, which is not supported. Kbuild may fail.) +$(warning $$(KERNELDIR)/vmlinux: Note: vmlinux is 64-bit, which is supported but currently experimental.) endif else $(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.) endif endif +ifneq ($(VMLINUX_HAS_PAE40),false) +ifeq ($(VMLINUX_HAS_DMA32),false) +$(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.) +$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) +endif +endif + +ifneq ($(SGX_FEATURE_36BIT_MMU),1) +ifneq ($(VMLINUX_IS_64BIT),false) +# Kernel is 64-bit +ifeq ($(VMLINUX_HAS_DMA32),false) +$(warning SGX is configured with 32-bit MMU. Your Kernel is 64-bit but does not have CONFIG_ZONE_DMA32.) +$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) +endif +else + # Kernel is 32-bit +ifneq ($(VMLINUX_HAS_PAE36),false) +ifeq ($(VMLINUX_HAS_DMA32),false) +$(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA32. ) +$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) +endif +endif +endif +endif + # Ideally configured by platform Makefiles, as necessary # @@ -500,7 +545,6 @@ $(eval $(call TunableBothConfigC,PDUMP,)) $(eval $(call TunableBothConfigC,NO_HARDWARE,)) $(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,)) $(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,)) -$(eval $(call TunableBothConfigC,SGX_DISABLE_VISTEST_SUPPORT,)) $(eval $(call TunableBothConfigC,PVRSRV_RESET_ON_HWTIMEOUT,)) $(eval $(call TunableBothConfigC,SYS_USING_INTERRUPTS,1)) $(eval $(call TunableBothConfigC,SUPPORT_EXTERNAL_SYSTEM_CACHE,)) @@ -513,6 +557,8 @@ $(eval $(call TunableBothConfigC,SUPPORT_ION,)) $(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,)) $(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1)) $(eval $(call TunableBothConfigC,SUPPORT_NV12_FROM_2_HWADDRS,)) +$(eval $(call TunableBothConfigC,SGX_FEATURE_36BIT_MMU,)) +$(eval $(call TunableBothConfigC,IMG_ADDRSPACE_PHYSADDR_BITS,)) $(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_WRITECOMBINE,1)) $(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_PAT,1)) diff --git a/eurasiacon/build/linux2/defs.mk b/eurasiacon/build/linux2/defs.mk index 621e03e..c458d99 100644 --- a/eurasiacon/build/linux2/defs.mk +++ b/eurasiacon/build/linux2/defs.mk @@ -116,6 +116,10 @@ define host-cc-option $(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1)) endef +define host-cxx-option +$(call cc-check,$(patsubst @%,%,$(HOST_CXX)),$(OUT),$(1)) +endef + define kernel-cc-option $(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1)) endef diff --git a/eurasiacon/build/linux2/kbuild/external_tarball.mk b/eurasiacon/build/linux2/kbuild/external_tarball.mk deleted file mode 100644 index d3aa147..0000000 --- a/eurasiacon/build/linux2/kbuild/external_tarball.mk +++ /dev/null @@ -1,49 +0,0 @@ -########################################################################### ### -#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved -#@License Dual MIT/GPLv2 -# -# The contents of this file are subject to the MIT license as set out below. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# Alternatively, the contents of this file may be used under the terms of -# the GNU General Public License Version 2 ("GPL") in which case the provisions -# of GPL are applicable instead of those above. -# -# If you wish to allow use of your version of this file only under the terms of -# GPL, and not to allow others to use your version of this file under the terms -# of the MIT license, indicate your decision by deleting the provisions above -# and replace them with the notice and other provisions required by GPL as set -# out in the file called "GPL-COPYING" included in this distribution. If you do -# not delete the provisions above, a recipient may use your version of this file -# under the terms of either the MIT license or GPL. -# -# This License is also included in this distribution in the file called -# "MIT-COPYING". -# -# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS -# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -### ########################################################################### - -ifneq ($(EXTERNAL_3PDD_TARBALL),) -TAR_OPT_STRIP_COMPONENTS ?= --strip-components -prepare_tree: $(OUT)/target/kbuild/external -$(OUT)/target/kbuild/external: eurasiacon/external/$(EXTERNAL_3PDD_TARBALL) - @echo "Extracting $<.." - @mkdir -p $@ - @tar $(TAR_OPT_STRIP_COMPONENTS) 1 --touch -jxf $< -C $@ - @touch $(OUT)/target/kbuild/external -endif diff --git a/eurasiacon/build/linux2/moduledefs.mk b/eurasiacon/build/linux2/moduledefs.mk index 869026f..d0c4215 100644 --- a/eurasiacon/build/linux2/moduledefs.mk +++ b/eurasiacon/build/linux2/moduledefs.mk @@ -61,7 +61,11 @@ MODULE_INTERMEDIATES_DIR := $(if $(MODULE_HOST_BUILD),$(HOST_INTERMEDIATES)/$(TH $(MODULE_INTERMEDIATES_DIR): $(make-directory) +# These are used for messages and variable names where we need to say "host" +# or "target" according to the module build type. Host_or_target := $(if $(MODULE_HOST_BUILD),Host,Target) +host_or_target := $(if $(MODULE_HOST_BUILD),host,target) +HOST_OR_TARGET := $(if $(MODULE_HOST_BUILD),HOST,TARGET) # These define the rules for finding source files. # - If a name begins with a slash, we strip $(TOP) off the front if it begins diff --git a/eurasiacon/build/linux2/omap4430_linux/Makefile b/eurasiacon/build/linux2/omap4430_linux/Makefile deleted file mode 100644 index 6d0e81a..0000000 --- a/eurasiacon/build/linux2/omap4430_linux/Makefile +++ /dev/null @@ -1,187 +0,0 @@ -########################################################################### ### -#@Title Root makefile for OMAP4430 Linux. Builds everything else. -#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved -#@License Dual MIT/GPLv2 -# -# The contents of this file are subject to the MIT license as set out below. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# Alternatively, the contents of this file may be used under the terms of -# the GNU General Public License Version 2 ("GPL") in which case the provisions -# of GPL are applicable instead of those above. -# -# If you wish to allow use of your version of this file only under the terms of -# GPL, and not to allow others to use your version of this file under the terms -# of the MIT license, indicate your decision by deleting the provisions above -# and replace them with the notice and other provisions required by GPL as set -# out in the file called "GPL-COPYING" included in this distribution. If you do -# not delete the provisions above, a recipient may use your version of this file -# under the terms of either the MIT license or GPL. -# -# This License is also included in this distribution in the file called -# "MIT-COPYING". -# -# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS -# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -### ########################################################################### - -PVR_SYSTEM := omap4 - -KERNEL_COMPONENTS := srvkm bufferclass_example - -include ../kernel_version.mk - -# Only enable active power management if passive power management is -# enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP, -# the system can suspend in the case where active power management is -# enabled in the SGX driver, but passive power management isn't. As -# passive power management isn't enabled, the driver won't see the -# system suspend/resume events, and so won't take appropriate action. -LDM_PLATFORM ?= 1 - -ifeq ($(LDM_PLATFORM),1) -SUPPORT_LINUX_USING_WORKQUEUES := 1 -DISPLAY_CONTROLLER_COMPONENT += dc_omapfb3_linux -DISPLAY_CONTROLLER := omaplfb -else -SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1 -OMAP_NON_FLIP_DISPLAY := 1 -DISPLAY_CONTROLLER_COMPONENT += linux_framebuffer -DISPLAY_CONTROLLER := pvrlfb -endif - -OPTIM := -Os - -SYS_CFLAGS := -march=armv7-a - -ifneq ($(CROSS_COMPILE),) -SYS_CFLAGS += -mtls-dialect=arm -endif - -SUPPORT_OMAP4430_NEON ?= 1 - -ifeq ($(SUPPORT_OMAP4430_NEON),1) -SYS_CFLAGS += -ftree-vectorize -mfpu=neon -mfloat-abi=softfp -endif - -LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name) - -SGXCORE := 540 -SGX_CORE_REV := 120 - -SGX_DYNAMIC_TIMING_INFO := 1 -SYS_CUSTOM_POWERLOCK_WRAP := 1 - -ifeq ($(OMAP_NON_FLIP_DISPLAY),1) -OPK_DEFAULT := libpvrPVR2D_BLITWSEGL.so -else -OPK_DEFAULT := libpvrPVR2D_FLIPWSEGL.so -endif - -ifeq ($(call kernel-version-at-least,2,6,35),true) -# Work around flipping problems seen with the Taal LCDs on Blaze. -# The work around is safe to use with other types of screen on Blaze -# (e.g. HDMI) and on other platforms (e.g. Panda board). -PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY := 1 -ifeq ($(LDM_PLATFORM),1) -PVR_LDM_PLATFORM_PRE_REGISTERED := 1 -ifeq ($(call kernel-version-at-least,2,6,35,7),true) -# Not all variants of the OMAP4 kernel have a DRM based framebuffer. -# Note that a non-X.Org version of the driver does not have to be built -# with DRM support if the kernel has a DRM based framebuffer. -PVR_OMAPLFB_DRM_FB ?= 1 -ifeq ($(PVR_OMAPLFB_DRM_FB),1) -PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm_pvr\"" -# There is already a "pvrsrvkm" driver (part of the DRM framebuffer code), -# so use the pre-registered device name instead. -PVR_LDM_DRIVER_REGISTRATION_NAME := "\"pvrsrvkm_pvr"\" -# The DRM library will not load the Services module on behalf of the X Server, -# as a DRM module has already been loaded (the DRM based framebuffer), so -# load the Services module before starting the X Server. -XORG_EXPLICIT_PVR_SERVICES_LOAD := 1 -else -PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm\"" -endif -endif -endif -endif - -include ../common/xorg_test.mk -ifeq ($(want_xorg),1) - -SUPPORT_DRI_DRM := 1 - -ifeq ($(call kernel-version-at-least,2,6,35),true) -PVR_DRI_DRM_PLATFORM_DEV := 1 -PVR_DRI_DRM_STATIC_BUS_ID := 1 -ifeq ($(call kernel-version-at-least,2,6,35,7),true) -ifeq ($(PVR_OMAPLFB_DRM_FB),1) -SUPPORT_DRI_DRM_PLUGIN := 1 -endif -ifeq ($(call kernel-version-at-least,2,6,36),true) -PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm"\" -else -PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm:00"\" -endif -# A client DRI authorisation failure, whilst switched away from the X Server -# VT, prevents all other attempts at DRI authorisation, even after -# switching back to the X server VT, so don't perform a DRM drop master -# call. -PVR_XORG_DONT_DROP_MASTER_IN_LEAVE_VT := 1 -endif -else -PVR_DRI_DRM_NOT_PCI := 1 -endif - -XORG_TOOLCHAIN ?= tarballs-omap4-ubuntu-10.10-cross -XORG_PVR_CONF := omap4 -XORG_PVR_VIDEO := omap4 - -OPK_FALLBACK := libpvrPVR2D_DRIWSEGL.so - -ifneq ($(OMAP_NON_FLIP_DISPLAY),1) -XORG_PVR_VIDEO ?= $(PVR_SYSTEM) -PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1 -endif - -else # xorg isn't excluded - -OPK_FALLBACK := libpvrPVR2D_BLITWSEGL.so - -endif # xorg isn't excluded - -ifeq ($(SUPPORT_DRI_DRM),1) -ifeq ($(PVR_DRI_DRM_NOT_PCI),1) -KERNEL_COMPONENTS += linux_drm -EXTRA_KBUILD_SOURCE := $(KERNELDIR) -endif -EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT) -else -KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT) -endif - -include ../config/core.mk -include ../common/xorg.mk -include ../common/dridrm.mk -include ../common/opencl.mk -include ../common/omap4.mk - -# We only need this for pvr_video's includes, which should -# really be done differently, as DISPLAY_CONTROLLER_DIR is -# now obsolete.. -# -$(eval $(call UserConfigMake,DISPLAY_CONTROLLER_DIR,3rdparty/$(DISPLAY_CONTROLLER_COMPONENT))) diff --git a/eurasiacon/build/linux2/prepare_tree.mk b/eurasiacon/build/linux2/prepare_tree.mk index 05e4fe3..75dcca6 100644 --- a/eurasiacon/build/linux2/prepare_tree.mk +++ b/eurasiacon/build/linux2/prepare_tree.mk @@ -40,10 +40,6 @@ .PHONY: prepare_tree --include eurasiacon/build/linux2/kbuild/external_tarball.mk - -# If there's no external tarball, there's nothing to do -# prepare_tree: INTERNAL_INCLUDED_PREPARE_HEADERS := diff --git a/eurasiacon/build/linux2/toplevel.mk b/eurasiacon/build/linux2/toplevel.mk index 26b1198..dde6b2b 100644 --- a/eurasiacon/build/linux2/toplevel.mk +++ b/eurasiacon/build/linux2/toplevel.mk @@ -224,3 +224,7 @@ clobber-%: $(RM) -rf $(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*) include $(MAKE_TOP)/bits.mk + +# D=nobuild stops the build before any recipes are run. This line should +# come at the end of this makefile. +$(if $(filter nobuild,$(D)),$(error D=nobuild given),) diff --git a/include4/img_defs.h b/include4/img_defs.h index 375ed99..bf0c360 100644 --- a/include4/img_defs.h +++ b/include4/img_defs.h @@ -147,6 +147,71 @@ typedef char TCHAR, *PTCHAR, *PTSTR; #define IMG_UNDEF (~0UL) #endif +/* + Do the right thing when using printf to output cpu addresses, + depending on architecture. + */ +#if defined (_WIN64) + #define UINTPTR_FMT "%016llX" +#else + #if defined (__x86_64__) + #define UINTPTR_FMT "%016lX" + #else + #define UINTPTR_FMT "%08lX" + #endif +#endif + +/* + Similarly for DEV_ and SYS_ PHYSADDRs, but this is dependent on 32/36-bit MMU + capability, in addition to host architecture. + */ +#if IMG_ADDRSPACE_PHYSADDR_BITS == 32 + #if defined(IMG_UINT32_IS_ULONG) + #define CPUPADDR_FMT "%08lX" + #define DEVPADDR_FMT "%08lX" + #define SYSPADDR_FMT "%08lX" + #else + #define CPUPADDR_FMT "%08X" + #define DEVPADDR_FMT "%08X" + #define SYSPADDR_FMT "%08X" + #endif +#else + #if defined(__x86_64__) + #define CPUPADDR_FMT "%016lX" + #define DEVPADDR_FMT "%016lX" + #define SYSPADDR_FMT "%016lX" + #else + + #define CPUPADDR_FMT "%016llX" + #define DEVPADDR_FMT "%016llX" + #define SYSPADDR_FMT "%016llX" + #endif +#endif + +/* + Define a printf format macro for the length property of the format-specifier + for size_t, that allows avoidance of C99 dependency on compilers that don't + support this, while still ensuring that whatever the size of size_t (eg 32, + 64 bit Linux builds, or Win32/64 builds), a size_t (or IMG_SIZE_T) can be + passed to printf-type functions without a cast. +*/ +#if defined LINUX + /* Use C99 format specifier where possible */ + #define SIZE_T_FMT_LEN "z" +#elif defined _WIN64 + #define SIZE_T_FMT_LEN "I" +#else + #define SIZE_T_FMT_LEN "l" /* May need to be updated as required, for other OSs */ +#endif + + +#if defined (__x86_64__) + #define IMG_UINT64_FMT "l" +#else + #define IMG_UINT64_FMT "ll" /* May need to be updated as required, for other OSs */ +#endif + + #endif /* #if !defined (__IMG_DEFS_H__) */ /***************************************************************************** End of file (IMG_DEFS.H) diff --git a/include4/img_types.h b/include4/img_types.h index 7f5137e..3e04e4a 100644 --- a/include4/img_types.h +++ b/include4/img_types.h @@ -75,17 +75,16 @@ typedef signed long IMG_INT32, *IMG_PINT32; #endif #if defined(USE_CODE) - -typedef unsigned __int64 IMG_UINT64, *IMG_PUINT64; -typedef __int64 IMG_INT64, *IMG_PINT64; - + typedef unsigned __int64 IMG_UINT64, *IMG_PUINT64; + typedef __int64 IMG_INT64, *IMG_PINT64; +#elif defined(LINUX) && defined (__x86_64) + typedef unsigned long IMG_UINT64, *IMG_PUINT64; + typedef long IMG_INT64, *IMG_PINT64; +#elif defined(LINUX) || defined(__METAG) || defined (__QNXNTO__) + typedef unsigned long long IMG_UINT64, *IMG_PUINT64; + typedef long long IMG_INT64, *IMG_PINT64; #else - #if defined(LINUX) || defined(__METAG) || defined (__QNXNTO__) - typedef unsigned long long IMG_UINT64, *IMG_PUINT64; - typedef long long IMG_INT64, *IMG_PINT64; - #else - #error("define an OS") - #endif + #error("define an OS") #endif #if !(defined(LINUX) && defined (__KERNEL__)) @@ -107,11 +106,19 @@ typedef IMG_INT32 IMG_RESULT; #if defined(_WIN64) typedef unsigned __int64 IMG_UINTPTR_T; + typedef signed __int64 IMG_INTPTR_T; typedef signed __int64 IMG_PTRDIFF_T; typedef IMG_UINT64 IMG_SIZE_T; #else - typedef unsigned int IMG_UINTPTR_T; - typedef IMG_UINT32 IMG_SIZE_T; + #if defined (__x86_64__) + typedef IMG_UINT64 IMG_SIZE_T; + typedef unsigned long IMG_UINTPTR_T; + typedef signed long IMG_INTPTR_T; + #else + typedef IMG_UINT32 IMG_SIZE_T; + typedef unsigned long IMG_UINTPTR_T; + typedef signed long IMG_INTPTR_T; + #endif #endif typedef IMG_PVOID IMG_HANDLE; @@ -121,9 +128,9 @@ typedef void** IMG_HVOID, * IMG_PHVOID; #define IMG_NULL 0 /* services/stream ID */ -typedef IMG_UINT32 IMG_SID; +typedef IMG_UINTPTR_T IMG_SID; -typedef IMG_UINT32 IMG_EVENTSID; +typedef IMG_UINTPTR_T IMG_EVENTSID; /* * Address types. @@ -184,7 +191,12 @@ typedef IMG_UINT32 IMG_DEVMEM_SIZE_T; typedef struct _IMG_CPU_PHYADDR { /* variable sized type (32,64) */ - IMG_UINTPTR_T uiAddr; +#if IMG_ADDRSPACE_PHYSADDR_BITS == 32 + /* variable sized type (32,64) */ + IMG_UINT32 uiAddr; +#else + IMG_UINT64 uiAddr; +#endif } IMG_CPU_PHYADDR; /* device physical address */ @@ -192,10 +204,9 @@ typedef struct _IMG_DEV_PHYADDR { #if IMG_ADDRSPACE_PHYSADDR_BITS == 32 /* variable sized type (32,64) */ - IMG_UINTPTR_T uiAddr; -#else IMG_UINT32 uiAddr; - IMG_UINT32 uiHighAddr; +#else + IMG_UINT64 uiAddr; #endif } IMG_DEV_PHYADDR; @@ -203,7 +214,12 @@ typedef struct _IMG_DEV_PHYADDR typedef struct _IMG_SYS_PHYADDR { /* variable sized type (32,64) */ - IMG_UINTPTR_T uiAddr; +#if IMG_ADDRSPACE_PHYSADDR_BITS == 32 + /* variable sized type (32,64) */ + IMG_UINT32 uiAddr; +#else + IMG_UINT64 uiAddr; +#endif } IMG_SYS_PHYADDR; #include "img_defs.h" diff --git a/include4/pvr_debug.h b/include4/pvr_debug.h index 7e05666..fcc0275 100644 --- a/include4/pvr_debug.h +++ b/include4/pvr_debug.h @@ -53,16 +53,17 @@ extern "C" { #define PVR_MAX_DEBUG_MESSAGE_LEN (512) /* These are privately used by pvr_debug, use the PVR_DBG_ defines instead */ -#define DBGPRIV_FATAL 0x01UL -#define DBGPRIV_ERROR 0x02UL -#define DBGPRIV_WARNING 0x04UL -#define DBGPRIV_MESSAGE 0x08UL -#define DBGPRIV_VERBOSE 0x10UL -#define DBGPRIV_CALLTRACE 0x20UL -#define DBGPRIV_ALLOC 0x40UL -#define DBGPRIV_DBGDRV_MESSAGE 0x80UL - -#define DBGPRIV_DBGLEVEL_COUNT 8 +#define DBGPRIV_FATAL 0x001UL +#define DBGPRIV_ERROR 0x002UL +#define DBGPRIV_WARNING 0x004UL +#define DBGPRIV_MESSAGE 0x008UL +#define DBGPRIV_VERBOSE 0x010UL +#define DBGPRIV_CALLTRACE 0x020UL +#define DBGPRIV_ALLOC 0x040UL +#define DBGPRIV_BUFFERED 0x080UL +#define DBGPRIV_DBGDRV_MESSAGE 0x100UL + +#define DBGPRIV_DBGLEVEL_COUNT 9 #if !defined(PVRSRV_NEED_PVR_ASSERT) && defined(DEBUG) #define PVRSRV_NEED_PVR_ASSERT @@ -143,27 +144,29 @@ IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugAssertFail(const IMG_CHAR *pszFile, #define PVR_DBG_VERBOSE DBGPRIV_VERBOSE #define PVR_DBG_CALLTRACE DBGPRIV_CALLTRACE #define PVR_DBG_ALLOC DBGPRIV_ALLOC + #define PVR_DBG_BUFFERED DBGPRIV_BUFFERED #define PVR_DBGDRIV_MESSAGE DBGPRIV_DBGDRV_MESSAGE /* These levels are always on with PVRSRV_NEED_PVR_DPF */ - #define __PVR_DPF_0x01UL(x...) PVRSRVDebugPrintf(DBGPRIV_FATAL, x) - #define __PVR_DPF_0x02UL(x...) PVRSRVDebugPrintf(DBGPRIV_ERROR, x) + #define __PVR_DPF_0x001UL(x...) PVRSRVDebugPrintf(DBGPRIV_FATAL, x) + #define __PVR_DPF_0x002UL(x...) PVRSRVDebugPrintf(DBGPRIV_ERROR, x) + #define __PVR_DPF_0x080UL(x...) PVRSRVDebugPrintf(DBGPRIV_BUFFERED, x) /* Some are compiled out completely in release builds */ #if defined(DEBUG) - #define __PVR_DPF_0x04UL(x...) PVRSRVDebugPrintf(DBGPRIV_WARNING, x) - #define __PVR_DPF_0x08UL(x...) PVRSRVDebugPrintf(DBGPRIV_MESSAGE, x) - #define __PVR_DPF_0x10UL(x...) PVRSRVDebugPrintf(DBGPRIV_VERBOSE, x) - #define __PVR_DPF_0x20UL(x...) PVRSRVDebugPrintf(DBGPRIV_CALLTRACE, x) - #define __PVR_DPF_0x40UL(x...) PVRSRVDebugPrintf(DBGPRIV_ALLOC, x) - #define __PVR_DPF_0x80UL(x...) PVRSRVDebugPrintf(DBGPRIV_DBGDRV_MESSAGE, x) + #define __PVR_DPF_0x004UL(x...) PVRSRVDebugPrintf(DBGPRIV_WARNING, x) + #define __PVR_DPF_0x008UL(x...) PVRSRVDebugPrintf(DBGPRIV_MESSAGE, x) + #define __PVR_DPF_0x010UL(x...) PVRSRVDebugPrintf(DBGPRIV_VERBOSE, x) + #define __PVR_DPF_0x020UL(x...) PVRSRVDebugPrintf(DBGPRIV_CALLTRACE, x) + #define __PVR_DPF_0x040UL(x...) PVRSRVDebugPrintf(DBGPRIV_ALLOC, x) + #define __PVR_DPF_0x100UL(x...) PVRSRVDebugPrintf(DBGPRIV_DBGDRV_MESSAGE, x) #else - #define __PVR_DPF_0x04UL(x...) - #define __PVR_DPF_0x08UL(x...) - #define __PVR_DPF_0x10UL(x...) - #define __PVR_DPF_0x20UL(x...) - #define __PVR_DPF_0x40UL(x...) - #define __PVR_DPF_0x80UL(x...) + #define __PVR_DPF_0x004UL(x...) + #define __PVR_DPF_0x008UL(x...) + #define __PVR_DPF_0x010UL(x...) + #define __PVR_DPF_0x020UL(x...) + #define __PVR_DPF_0x040UL(x...) + #define __PVR_DPF_0x100UL(x...) #endif /* Translate the different log levels to separate macros @@ -188,6 +191,7 @@ IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugAssertFail(const IMG_CHAR *pszFile, #define PVR_DBG_VERBOSE DBGPRIV_VERBOSE,__FILE__, __LINE__ #define PVR_DBG_CALLTRACE DBGPRIV_CALLTRACE,__FILE__, __LINE__ #define PVR_DBG_ALLOC DBGPRIV_ALLOC,__FILE__, __LINE__ + #define PVR_DBG_BUFFERED DBGPRIV_BUFFERED,__FILE__, __LINE__ #define PVR_DBGDRIV_MESSAGE DBGPRIV_DBGDRV_MESSAGE, "", 0 #define PVR_DPF(X) PVRSRVDebugPrintf X @@ -200,13 +204,14 @@ IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugPrintf(IMG_UINT32 ui32DebugLevel, const IMG_CHAR *pszFormat, ...) IMG_FORMAT_PRINTF(4, 5); +IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVDebugPrintfDumpCCB(void); + #else /* defined(PVRSRV_NEED_PVR_DPF) */ #define PVR_DPF(X) #endif /* defined(PVRSRV_NEED_PVR_DPF) */ - /* PVR_TRACE() handling */ #if defined(PVRSRV_NEED_PVR_TRACE) diff --git a/include4/pvrversion.h b/include4/pvrversion.h index cc327ae..0e4b5c2 100644 --- a/include4/pvrversion.h +++ b/include4/pvrversion.h @@ -49,21 +49,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PVR_STR2(X) PVR_STR(X) #define PVRVERSION_MAJ 1 -#define PVRVERSION_MIN 9 -#define PVRVERSION_BRANCH 19 +#define PVRVERSION_MIN 10 #define PVRVERSION_FAMILY "sgxddk" -#define PVRVERSION_BRANCHNAME "1.9" -#define PVRVERSION_BUILD 2188537 +#define PVRVERSION_BRANCHNAME "1.10" +#define PVRVERSION_BUILD 2359475 #define PVRVERSION_BSCONTROL "SGX_DDK_Linux_CustomerTI" -#define PVRVERSION_STRING "SGX_DDK_Linux_CustomerTI sgxddk 19 1.9@" PVR_STR2(PVRVERSION_BUILD) -#define PVRVERSION_STRING_SHORT "1.9@" PVR_STR2(PVRVERSION_BUILD) +#define PVRVERSION_STRING "SGX_DDK_Linux_CustomerTI sgxddk 1.10@" PVR_STR2(PVRVERSION_BUILD) +#define PVRVERSION_STRING_SHORT "1.10@" PVR_STR2(PVRVERSION_BUILD) #define COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved." -#define PVRVERSION_BUILD_HI 218 -#define PVRVERSION_BUILD_LO 8537 +#define PVRVERSION_BUILD_HI 235 +#define PVRVERSION_BUILD_LO 9475 #define PVRVERSION_STRING_NUMERIC PVR_STR2(PVRVERSION_MAJ) "." PVR_STR2(PVRVERSION_MIN) "." PVR_STR2(PVRVERSION_BUILD_HI) "." PVR_STR2(PVRVERSION_BUILD_LO) #endif /* _PVRVERSION_H_ */ diff --git a/include4/services.h b/include4/services.h index 5b927a7..418d7f1 100644 --- a/include4/services.h +++ b/include4/services.h @@ -354,11 +354,7 @@ typedef struct _PVRSRV_CONNECTION_ typedef struct _PVRSRV_DEV_DATA_ { IMG_CONST PVRSRV_CONNECTION *psConnection; /*!< Services connection info */ -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevCookie; /*!< Dev cookie */ -#else IMG_HANDLE hDevCookie; /*!< Dev cookie */ -#endif } PVRSRV_DEV_DATA; @@ -427,16 +423,6 @@ typedef struct _PVRSRV_CLIENT_MEM_INFO_ /* ptr to associated client sync info - NULL if no sync */ struct _PVRSRV_CLIENT_SYNC_INFO_ *psClientSyncInfo; -#if defined (SUPPORT_SID_INTERFACE) - /* handle to client mapping data (OS specific) */ - IMG_SID hMappingInfo; - - /* handle to kernel mem info */ - IMG_SID hKernelMemInfo; - - /* resman handle for UM mapping clean-up */ - IMG_SID hResItem; -#else /* handle to client mapping data (OS specific) */ IMG_HANDLE hMappingInfo; @@ -445,7 +431,6 @@ typedef struct _PVRSRV_CLIENT_MEM_INFO_ /* resman handle for UM mapping clean-up */ IMG_HANDLE hResItem; -#endif #if defined(SUPPORT_MEMINFO_IDS) #if !defined(USE_CODE) @@ -456,6 +441,9 @@ typedef struct _PVRSRV_CLIENT_MEM_INFO_ IMG_UINT32 dummy2; #endif /* !defined(USE_CODE) */ #endif /* defined(SUPPORT_MEMINFO_IDS) */ +#if defined(SUPPORT_ION) + IMG_SIZE_T uiIonBufferSize; +#endif /* defined(SUPPORT_ION) */ /* ptr to next mem info @@ -474,11 +462,7 @@ typedef struct _PVRSRV_CLIENT_MEM_INFO_ typedef struct _PVRSRV_HEAP_INFO_ { IMG_UINT32 ui32HeapID; -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemHeap; -#else IMG_HANDLE hDevMemHeap; -#endif IMG_DEV_VIRTADDR sDevVAddrBase; IMG_UINT32 ui32HeapByteSize; IMG_UINT32 ui32Attribs; @@ -496,11 +480,7 @@ typedef struct _PVRSRV_EVENTOBJECT_ /* globally unique name of the event object */ IMG_CHAR szName[EVENTOBJNAME_MAXLENGTH]; /* kernel specific handle for the event object */ -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hOSEventKM; -#else IMG_HANDLE hOSEventKM; -#endif } PVRSRV_EVENTOBJECT; @@ -526,13 +506,8 @@ typedef struct _PVRSRV_MISC_INFO_ /*!< SOC Timer register */ IMG_VOID *pvSOCTimerRegisterKM; IMG_VOID *pvSOCTimerRegisterUM; -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSOCTimerRegisterOSMemHandle; - IMG_SID hSOCTimerRegisterMappingInfo; -#else IMG_HANDLE hSOCTimerRegisterOSMemHandle; IMG_HANDLE hSOCTimerRegisterMappingInfo; -#endif /*!< SOC Clock Gating registers */ IMG_VOID *pvSOCClockGateRegs; @@ -544,11 +519,7 @@ typedef struct _PVRSRV_MISC_INFO_ /* global event object */ PVRSRV_EVENTOBJECT sGlobalEventObject;//FIXME: should be private to services -#if defined (SUPPORT_SID_INTERFACE) - IMG_EVENTSID hOSGlobalEvent; -#else IMG_HANDLE hOSGlobalEvent; -#endif /* Note: add misc. items as required */ IMG_UINT32 aui32DDKVersion[4]; @@ -566,7 +537,6 @@ typedef struct _PVRSRV_MISC_INFO_ * directly in the srvclient PVRSRVGetMiscInfo code, and then convert it * to a kernel meminfo if required. Try to not waste space. */ -#if !defined (SUPPORT_SID_INTERFACE) union { /*!< Input client meminfo (UM side) */ @@ -575,7 +545,6 @@ typedef struct _PVRSRV_MISC_INFO_ /*!< Output kernel meminfo (Bridge+KM side) */ struct _PVRSRV_KERNEL_MEM_INFO_ *psKernelMemInfo; } u; -#endif /*!< Offset in MemInfo to start cache op */ IMG_VOID *pvBaseVAddr; @@ -591,7 +560,6 @@ typedef struct _PVRSRV_MISC_INFO_ * directly in the srvclient PVRSRVGetMiscInfo code, and then convert it * to a kernel meminfo if required. Try to not waste space. */ -#if !defined(SUPPORT_SID_INTERFACE) union { /*!< Input client meminfo (UM side) */ @@ -600,7 +568,6 @@ typedef struct _PVRSRV_MISC_INFO_ /*!< Output kernel meminfo (Bridge+KM side) */ struct _PVRSRV_KERNEL_MEM_INFO_ *psKernelMemInfo; } u; -#endif /*!< Resulting refcount */ IMG_UINT32 ui32RefCount; @@ -620,11 +587,7 @@ typedef struct _PVRSRV_SYNC_TOKEN_ The fields are hidden in sPrivate in order to reinforce this. */ struct { -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelSyncInfo; -#else IMG_HANDLE hKernelSyncInfo; -#endif IMG_UINT32 ui32ReadOpsPendingSnapshot; IMG_UINT32 ui32WriteOpsPendingSnapshot; IMG_UINT32 ui32ReadOps2PendingSnapshot; @@ -673,11 +636,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVReleaseMiscInfo (IMG_CONST PVRSRV_CONNECTION *ps IMG_IMPORT PVRSRV_ERROR PVRSRVPollForValue ( const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hOSEvent, -#else IMG_HANDLE hOSEvent, -#endif volatile IMG_UINT32 *pui32LinMemAddr, IMG_UINT32 ui32Value, IMG_UINT32 ui32Mask, @@ -687,30 +646,18 @@ PVRSRV_ERROR PVRSRVPollForValue ( const PVRSRV_CONNECTION *psConnection, /* memory APIs */ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVCreateDeviceMemContext(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID *phDevMemContext, -#else IMG_HANDLE *phDevMemContext, -#endif IMG_UINT32 *pui32SharedHeapCount, PVRSRV_HEAP_INFO *psHeapInfo); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVDestroyDeviceMemContext(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemContext -#else IMG_HANDLE hDevMemContext -#endif ); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVGetDeviceMemHeapInfo(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemContext, -#else IMG_HANDLE hDevMemContext, -#endif IMG_UINT32 *pui32SharedHeapCount, PVRSRV_HEAP_INFO *psHeapInfo); @@ -727,11 +674,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVGetDeviceMemHeapInfo(IMG_CONST PVRSRV_DEV_DATA * IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVAllocDeviceMem2(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemHeap, -#else IMG_HANDLE hDevMemHeap, -#endif IMG_UINT32 ui32Attribs, IMG_SIZE_T ui32Size, IMG_SIZE_T ui32Alignment, @@ -741,11 +684,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVAllocDeviceMem2(IMG_CONST PVRSRV_DEV_DATA *psDev IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVAllocDeviceMem(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemHeap, -#else IMG_HANDLE hDevMemHeap, -#endif IMG_UINT32 ui32Attribs, IMG_SIZE_T ui32Size, IMG_SIZE_T ui32Alignment, @@ -758,20 +697,12 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVFreeDeviceMem(IMG_CONST PVRSRV_DEV_DATA *psDevDa IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVExportDeviceMem(IMG_CONST PVRSRV_DEV_DATA *psDevData, PVRSRV_CLIENT_MEM_INFO *psMemInfo, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID *phMemInfo -#else IMG_HANDLE *phMemInfo -#endif ); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVReserveDeviceVirtualMem(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemHeap, -#else IMG_HANDLE hDevMemHeap, -#endif IMG_DEV_VIRTADDR *psDevVAddr, IMG_SIZE_T ui32Size, IMG_SIZE_T ui32Alignment, @@ -782,13 +713,8 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVFreeDeviceVirtualMem(IMG_CONST PVRSRV_DEV_DATA * IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVMapDeviceMemory (IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelMemInfo, - IMG_SID hDstDevMemHeap, -#else IMG_HANDLE hKernelMemInfo, IMG_HANDLE hDstDevMemHeap, -#endif PVRSRV_CLIENT_MEM_INFO **ppsDstMemInfo); IMG_IMPORT @@ -807,11 +733,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVUnmapExtMemory (IMG_CONST PVRSRV_DEV_DATA *psDev IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVWrapExtMemory(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemContext, -#else IMG_HANDLE hDevMemContext, -#endif IMG_SIZE_T ui32ByteSize, IMG_SIZE_T ui32PageOffset, IMG_BOOL bPhysContig, @@ -829,13 +751,8 @@ PVRSRV_ERROR PVRSRVChangeDeviceMemoryAttributes(IMG_CONST PVRSRV_DEV_DATA *psD IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVMapDeviceClassMemory (IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemContext, - IMG_SID hDeviceClassBuffer, -#else IMG_HANDLE hDevMemContext, IMG_HANDLE hDeviceClassBuffer, -#endif PVRSRV_CLIENT_MEM_INFO **ppsMemInfo); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVUnmapDeviceClassMemory (IMG_CONST PVRSRV_DEV_DATA *psDevData, @@ -863,23 +780,18 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVExportDeviceMem2(IMG_CONST PVRSRV_DEV_DATA *psDe IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVMapDeviceMemory2(IMG_CONST PVRSRV_DEV_DATA *psDevData, IMG_INT iFd, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDstDevMemHeap, -#else IMG_HANDLE hDstDevMemHeap, -#endif PVRSRV_CLIENT_MEM_INFO **ppsDstMemInfo); #endif /* defined(LINUX) */ #if defined(SUPPORT_ION) PVRSRV_ERROR PVRSRVMapIonHandle(const PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemContext, -#else - IMG_HANDLE hDevMemContext, -#endif - IMG_INT32 uiFD, - IMG_UINT32 uiSize, + IMG_HANDLE hDevMemHeap, + IMG_UINT32 ui32NumFDs, + IMG_INT *paiBufferFDs, + IMG_UINT32 ui32ChunkCount, + IMG_SIZE_T *pauiOffset, + IMG_SIZE_T *pauiSize, IMG_UINT32 ui32Attribs, PVRSRV_CLIENT_MEM_INFO **ppsMemInfo); @@ -890,11 +802,7 @@ PVRSRV_ERROR PVRSRVUnmapIonHandle(const PVRSRV_DEV_DATA *psDevData, IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVAllocDeviceMemSparse(const PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemHeap, -#else IMG_HANDLE hDevMemHeap, -#endif IMG_UINT32 ui32Attribs, IMG_SIZE_T uAlignment, IMG_UINT32 ui32ChunkSize, @@ -970,11 +878,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVEnumDCDims (IMG_HANDLE hDevice, IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVGetDCSystemBuffer(IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID *phBuffer -#else IMG_HANDLE *phBuffer -#endif ); IMG_IMPORT @@ -989,117 +893,69 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVCreateDCSwapChain (IMG_HANDLE hDevice, IMG_UINT32 ui32BufferCount, IMG_UINT32 ui32OEMFlags, IMG_UINT32 *pui32SwapChainID, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID *phSwapChain -#else IMG_HANDLE *phSwapChain -#endif ); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVDestroyDCSwapChain (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain -#else IMG_HANDLE hSwapChain -#endif ); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSetDCDstRect (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain, -#else IMG_HANDLE hSwapChain, -#endif IMG_RECT *psDstRect); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSetDCSrcRect (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain, -#else IMG_HANDLE hSwapChain, -#endif IMG_RECT *psSrcRect); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSetDCDstColourKey (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain, -#else IMG_HANDLE hSwapChain, -#endif IMG_UINT32 ui32CKColour); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSetDCSrcColourKey (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain, -#else IMG_HANDLE hSwapChain, -#endif IMG_UINT32 ui32CKColour); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVGetDCBuffers(IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain, - IMG_SID *phBuffer -#else IMG_HANDLE hSwapChain, IMG_HANDLE *phBuffer -#endif ); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVGetDCBuffers2(IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain, - IMG_SID *phBuffer, -#else IMG_HANDLE hSwapChain, IMG_HANDLE *phBuffer, -#endif IMG_SYS_PHYADDR *psPhyAddr); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSwapToDCBuffer (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hBuffer, -#else IMG_HANDLE hBuffer, -#endif IMG_UINT32 ui32ClipRectCount, IMG_RECT *psClipRect, IMG_UINT32 ui32SwapInterval, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hPrivateTag -#else IMG_HANDLE hPrivateTag -#endif ); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSwapToDCBuffer2 (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hBuffer, -#else IMG_HANDLE hBuffer, -#endif IMG_UINT32 ui32SwapInterval, PVRSRV_CLIENT_MEM_INFO **ppsMemInfos, - IMG_UINT32 ui32NumMemInfos, + PVRSRV_CLIENT_SYNC_INFO **ppsSyncInfos, + IMG_UINT32 ui32NumMemSyncInfos, IMG_PVOID pvPrivData, - IMG_UINT32 ui32PrivDataLength); + IMG_UINT32 ui32PrivDataLength, + IMG_HANDLE *phFence); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSwapToDCSystem (IMG_HANDLE hDevice, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hSwapChain -#else IMG_HANDLE hSwapChain -#endif ); /****************************************************************************** @@ -1120,11 +976,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVGetBCBufferInfo(IMG_HANDLE hDevice, IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVGetBCBuffer(IMG_HANDLE hDevice, IMG_UINT32 ui32BufferIndex, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID *phBuffer -#else IMG_HANDLE *phBuffer -#endif ); @@ -1142,11 +994,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpStopInitPhase(IMG_CONST PVRSRV_CONNECTION * IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpMemPol(IMG_CONST PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelMemInfo, -#else PVRSRV_CLIENT_MEM_INFO *psMemInfo, -#endif IMG_UINT32 ui32Offset, IMG_UINT32 ui32Value, IMG_UINT32 ui32Mask, @@ -1155,22 +1003,14 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpMemPol(IMG_CONST PVRSRV_CONNECTION *psConne IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpSyncPol(IMG_CONST PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelSyncInfo, -#else PVRSRV_CLIENT_SYNC_INFO *psClientSyncInfo, -#endif IMG_BOOL bIsRead, IMG_UINT32 ui32Value, IMG_UINT32 ui32Mask); IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpSyncPol2(IMG_CONST PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelSyncInfo, -#else PVRSRV_CLIENT_SYNC_INFO *psClientSyncInfo, -#endif IMG_BOOL bIsRead); IMG_IMPORT @@ -1222,11 +1062,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpPDDevPAddr(IMG_CONST PVRSRV_CONNECTION *psC #if !defined(USE_CODE) IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpMemPages(IMG_CONST PVRSRV_DEV_DATA *psDevData, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelMemInfo, -#else IMG_HANDLE hKernelMemInfo, -#endif IMG_DEV_PHYADDR *pPages, IMG_UINT32 ui32NumPages, IMG_DEV_VIRTADDR sDevVAddr, @@ -1279,11 +1115,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVPDumpBitmap(IMG_CONST PVRSRV_DEV_DATA *psDevData IMG_UINT32 ui32Height, IMG_UINT32 ui32StrideInBytes, IMG_DEV_VIRTADDR sDevBaseAddr, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hDevMemContext, -#else IMG_HANDLE hDevMemContext, -#endif IMG_UINT32 ui32Size, PDUMP_PIXEL_FORMAT ePixelFormat, PDUMP_MEM_FORMAT eMemFormat, @@ -1338,12 +1170,12 @@ IMG_IMPORT IMG_BOOL IMG_CALLCONV PVRSRVGetAppHint(IMG_VOID *pvHintState, *****************************************************************************/ /* Exported APIs */ -IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVAllocUserModeMem (IMG_SIZE_T ui32Size); -IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVCallocUserModeMem (IMG_SIZE_T ui32Size); -IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVReallocUserModeMem (IMG_PVOID pvBase, IMG_SIZE_T uNewSize); +IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVAllocUserModeMem (IMG_SIZE_T uiSize); +IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVCallocUserModeMem (IMG_SIZE_T uiSize); +IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVReallocUserModeMem (IMG_PVOID pvBase, IMG_SIZE_T uiNewSize); IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVFreeUserModeMem (IMG_PVOID pvMem); -IMG_IMPORT IMG_VOID PVRSRVMemCopy(IMG_VOID *pvDst, const IMG_VOID *pvSrc, IMG_SIZE_T ui32Size); -IMG_IMPORT IMG_VOID PVRSRVMemSet(IMG_VOID *pvDest, IMG_UINT8 ui8Value, IMG_SIZE_T ui32Size); +IMG_IMPORT IMG_VOID PVRSRVMemCopy(IMG_VOID *pvDst, const IMG_VOID *pvSrc, IMG_SIZE_T uiSize); +IMG_IMPORT IMG_VOID PVRSRVMemSet(IMG_VOID *pvDest, IMG_UINT8 ui8Value, IMG_SIZE_T uiSize); struct _PVRSRV_MUTEX_OPAQUE_STRUCT_; typedef struct _PVRSRV_MUTEX_OPAQUE_STRUCT_ *PVRSRV_MUTEX_HANDLE; @@ -1492,11 +1324,7 @@ IMG_IMPORT IMG_PVOID IMG_CALLCONV PVRSRVReallocUserModeMemTracking(IMG_VOID *pvM *****************************************************************************/ IMG_IMPORT PVRSRV_ERROR PVRSRVEventObjectWait(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_EVENTSID hOSEvent -#else IMG_HANDLE hOSEvent -#endif ); /*! @@ -1509,11 +1337,7 @@ IMG_IMPORT PVRSRV_ERROR PVRSRVEventObjectWait(const PVRSRV_CONNECTION *psConnect ******************************************************************************/ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVCreateSyncInfoModObj(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID *phKernelSyncInfoModObj -#else IMG_HANDLE *phKernelSyncInfoModObj -#endif ); /*! @@ -1526,11 +1350,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVCreateSyncInfoModObj(const PVRSRV_CONNECTION *ps ******************************************************************************/ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVDestroySyncInfoModObj(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelSyncInfoModObj -#else IMG_HANDLE hKernelSyncInfoModObj -#endif ); @@ -1565,11 +1385,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVDestroySyncInfoModObj(const PVRSRV_CONNECTION *p ******************************************************************************/ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVModifyPendingSyncOps(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelSyncInfoModObj, -#else IMG_HANDLE hKernelSyncInfoModObj, -#endif PVRSRV_CLIENT_SYNC_INFO *psSyncInfo, IMG_UINT32 ui32ModifyFlags, IMG_UINT32 *pui32ReadOpsPending, @@ -1590,11 +1406,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVModifyPendingSyncOps(const PVRSRV_CONNECTION *ps ******************************************************************************/ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVModifyCompleteSyncOps(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelSyncInfoModObj -#else IMG_HANDLE hKernelSyncInfoModObj -#endif ); /*! @@ -1620,11 +1432,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVModifyCompleteSyncOps(const PVRSRV_CONNECTION *p ******************************************************************************/ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSyncOpsTakeToken(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - const IMG_SID hKernelSyncInfo, -#else const PVRSRV_CLIENT_SYNC_INFO *psSyncInfo, -#endif PVRSRV_SYNC_TOKEN *psSyncToken); /*! ****************************************************************************** @@ -1644,11 +1452,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVSyncOpsTakeToken(const PVRSRV_CONNECTION *psConn ******************************************************************************/ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSyncOpsFlushToToken(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - const IMG_SID hKernelSyncInfo, -#else const PVRSRV_CLIENT_SYNC_INFO *psSyncInfo, -#endif const PVRSRV_SYNC_TOKEN *psSyncToken, IMG_BOOL bWait); /*! @@ -1671,11 +1475,7 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVSyncOpsFlushToToken(const PVRSRV_CONNECTION *psC ******************************************************************************/ IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVSyncOpsFlushToModObj(const PVRSRV_CONNECTION *psConnection, -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hKernelSyncInfoModObj, -#else IMG_HANDLE hKernelSyncInfoModObj, -#endif IMG_BOOL bWait); /*! diff --git a/include4/servicesext.h b/include4/servicesext.h index 80df117..2f044dd 100644 --- a/include4/servicesext.h +++ b/include4/servicesext.h @@ -645,6 +645,9 @@ typedef enum _PVRSRV_PIXEL_FORMAT_ { PVRSRV_PIXEL_FORMAT_RAW512 = 224, PVRSRV_PIXEL_FORMAT_RAW1024 = 225, + /* Same as NV12 but with interleaved VU rather than interleaved UV */ + PVRSRV_PIXEL_FORMAT_NV21 = 226, + PVRSRV_PIXEL_FORMAT_FORCE_I32 = 0x7fffffff } PVRSRV_PIXEL_FORMAT; @@ -744,17 +747,10 @@ typedef struct _PVRSRV_CLIENT_SYNC_INFO_ IMG_DEV_VIRTADDR sReadOps2CompleteDevVAddr; /* handle to client mapping data (OS specific) */ -#if defined (SUPPORT_SID_INTERFACE) - IMG_SID hMappingInfo; - - /* handle to kernel sync info */ - IMG_SID hKernelSyncInfo; -#else IMG_HANDLE hMappingInfo; /* handle to kernel sync info */ IMG_HANDLE hKernelSyncInfo; -#endif } PVRSRV_CLIENT_SYNC_INFO, *PPVRSRV_CLIENT_SYNC_INFO; @@ -803,7 +799,7 @@ typedef struct _IMG_RECT_16_ typedef PVRSRV_ERROR (*PFN_GET_BUFFER_ADDR)(IMG_HANDLE, IMG_HANDLE, IMG_SYS_PHYADDR**, - IMG_SIZE_T*, + IMG_UINT32*, IMG_VOID**, IMG_HANDLE*, IMG_BOOL*, diff --git a/include4/sgx_options.h b/include4/sgx_options.h index b64cd39..9a1627e 100644 --- a/include4/sgx_options.h +++ b/include4/sgx_options.h @@ -87,17 +87,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if defined (SUPPORT_SID_INTERFACE) -#define PVR_SECURE_HANDLES_SET_OFFSET OPTIONS_BIT4 -#define OPTIONS_BIT4 (0x1U << 4) -#else #if defined(PVR_SECURE_HANDLES) || defined (INTERNAL_TEST) #define PVR_SECURE_HANDLES_SET_OFFSET OPTIONS_BIT4 #define OPTIONS_BIT4 (0x1U << 4) #else #define OPTIONS_BIT4 0x0 #endif /* PVR_SECURE_HANDLES */ -#endif #if defined(SGX_BYPASS_SYSTEM_CACHE) || defined (INTERNAL_TEST) #define SGX_BYPASS_SYSTEM_CACHE_SET_OFFSET OPTIONS_BIT5 diff --git a/include4/sgxapi_km.h b/include4/sgxapi_km.h index bb8776a..05bb624 100644 --- a/include4/sgxapi_km.h +++ b/include4/sgxapi_km.h @@ -83,11 +83,8 @@ extern "C" { #if defined(SUPPORT_MEMORY_TILING) #define SGX_VPB_TILED_HEAP_ID 14 #endif -#if defined(SUPPORT_ION) -#define SGX_ION_HEAP_ID 15 -#endif -#define SGX_MAX_HEAP_ID 16 +#define SGX_MAX_HEAP_ID 15 /* * Keep SGX_3DPARAMETERS_HEAP_ID as TQ full custom @@ -120,8 +117,14 @@ extern "C" { #define SGX_MAX_SRC_SYNCS_TA 32 #define SGX_MAX_DST_SYNCS_TA 1 /* note: there is implicitly 1 3D Dst Sync */ +#if defined(PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC) +/* note: only one dst sync is supported by the 2D paths */ +#define SGX_MAX_SRC_SYNCS_TQ 6 +#define SGX_MAX_DST_SYNCS_TQ 2 +#else /* defined(PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC) */ #define SGX_MAX_SRC_SYNCS_TQ 8 #define SGX_MAX_DST_SYNCS_TQ 1 +#endif /* defined(PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC) */ #endif @@ -236,6 +239,7 @@ typedef struct _CTL_STATUS_ typedef enum _SGX_MISC_INFO_REQUEST_ { SGX_MISC_INFO_REQUEST_CLOCKSPEED = 0, + SGX_MISC_INFO_REQUEST_CLOCKSPEED_SLCSIZE, SGX_MISC_INFO_REQUEST_SGXREV, SGX_MISC_INFO_REQUEST_DRIVER_SGXREV, #if defined(SUPPORT_SGX_EDM_MEMORY_DEBUG) @@ -254,6 +258,9 @@ typedef enum _SGX_MISC_INFO_REQUEST_ SGX_MISC_INFO_REQUEST_SPM, SGX_MISC_INFO_REQUEST_ACTIVEPOWER, SGX_MISC_INFO_REQUEST_LOCKUPS, +#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) + SGX_MISC_INFO_REQUEST_EDM_STATUS_BUFFER_INFO, +#endif SGX_MISC_INFO_REQUEST_FORCE_I16 = 0x7fff } SGX_MISC_INFO_REQUEST; @@ -275,11 +282,24 @@ typedef struct _PVRSRV_SGX_MISCINFO_FEATURES #if defined(SUPPORT_SGX_EDM_MEMORY_DEBUG) IMG_UINT32 ui32DeviceMemValue; /*!< device mem value read from ukernel */ #endif +} PVRSRV_SGX_MISCINFO_FEATURES; + +typedef struct _PVRSRV_SGX_MISCINFO_QUERY_CLOCKSPEED_SLCSIZE +{ + IMG_UINT32 ui32SGXClockSpeed; + IMG_UINT32 ui32SGXSLCSize; +} PVRSRV_SGX_MISCINFO_QUERY_CLOCKSPEED_SLCSIZE; + #if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) +/****************************************************************************** + * Struct for getting access to the EDM Status Buffer + ******************************************************************************/ +typedef struct _PVRSRV_SGX_MISCINFO_EDM_STATUS_BUFFER_INFO +{ IMG_DEV_VIRTADDR sDevVAEDMStatusBuffer; /*!< DevVAddr of the EDM status buffer */ IMG_PVOID pvEDMStatusBuffer; /*!< CPUVAddr of the EDM status buffer */ +} PVRSRV_SGX_MISCINFO_EDM_STATUS_BUFFER_INFO; #endif -} PVRSRV_SGX_MISCINFO_FEATURES; /****************************************************************************** @@ -389,6 +409,7 @@ typedef struct _SGX_MISC_INFO_ IMG_UINT32 reserved; /*!< Unused: ensures valid code in the case everything else is compiled out */ PVRSRV_SGX_MISCINFO_FEATURES sSGXFeatures; IMG_UINT32 ui32SGXClockSpeed; + PVRSRV_SGX_MISCINFO_QUERY_CLOCKSPEED_SLCSIZE sQueryClockSpeedSLCSize; PVRSRV_SGX_MISCINFO_ACTIVEPOWER sActivePower; PVRSRV_SGX_MISCINFO_LOCKUPS sLockups; PVRSRV_SGX_MISCINFO_SPM sSPM; @@ -396,6 +417,10 @@ typedef struct _SGX_MISC_INFO_ SGX_BREAKPOINT_INFO sSGXBreakpointInfo; #endif PVRSRV_SGX_MISCINFO_SET_HWPERF_STATUS sSetHWPerfStatus; + +#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) + PVRSRV_SGX_MISCINFO_EDM_STATUS_BUFFER_INFO sEDMStatusBufferInfo; +#endif } uData; } SGX_MISC_INFO; @@ -439,7 +464,6 @@ typedef struct _PVRSRV_SGX_PDUMP_CONTEXT_ } PVRSRV_SGX_PDUMP_CONTEXT; -#if !defined (SUPPORT_SID_INTERFACE) typedef struct _SGX_KICKTA_DUMP_ROFF_ { IMG_HANDLE hKernelMemInfo; /*< Buffer handle */ @@ -448,13 +472,8 @@ typedef struct _SGX_KICKTA_DUMP_ROFF_ IMG_UINT32 ui32Value; /*< Actual value to dump */ IMG_PCHAR pszName; /*< Name of buffer */ } SGX_KICKTA_DUMP_ROFF, *PSGX_KICKTA_DUMP_ROFF; -#endif -#if defined (SUPPORT_SID_INTERFACE) -typedef struct _SGX_KICKTA_DUMP_BUFFER_KM_ -#else typedef struct _SGX_KICKTA_DUMP_BUFFER_ -#endif { IMG_UINT32 ui32SpaceUsed; IMG_UINT32 ui32Start; /*< Byte offset of start to dump */ @@ -475,13 +494,8 @@ typedef struct _SGX_KICKTA_DUMP_BUFFER_ #if defined (__QNXNTO__) IMG_UINT32 ui32NameLength; /*< Number of characters in buffer name */ #endif -#if defined (SUPPORT_SID_INTERFACE) -} SGX_KICKTA_DUMP_BUFFER_KM, *PSGX_KICKTA_DUMP_BUFFER_KM; -#else } SGX_KICKTA_DUMP_BUFFER, *PSGX_KICKTA_DUMP_BUFFER; -#endif -#if !defined (SUPPORT_SID_INTERFACE) #ifdef PDUMP /* PDUMP version of above kick structure @@ -501,7 +515,6 @@ typedef struct _SGX_KICKTA_PDUMP_ IMG_UINT32 ui32ROffArraySize; } SGX_KICKTA_PDUMP, *PSGX_KICKTA_PDUMP; #endif /* PDUMP */ -#endif /* #if !defined (SUPPORT_SID_INTERFACE) */ #if defined(TRANSFER_QUEUE) #if defined(SGX_FEATURE_2D_HARDWARE) diff --git a/include4/sgxscript.h b/include4/sgxscript.h index 46b89d2..2a3a846 100644 --- a/include4/sgxscript.h +++ b/include4/sgxscript.h @@ -42,11 +42,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __SGXSCRIPT_H__ #define __SGXSCRIPT_H__ +#include "sgxfeaturedefs.h" #if defined (__cplusplus) extern "C" { #endif #define SGX_MAX_INIT_COMMANDS 64 +#define SGX_MAX_PRINT_COMMANDS 96 #define SGX_MAX_DEINIT_COMMANDS 16 typedef enum _SGX_INIT_OPERATION @@ -54,6 +56,7 @@ typedef enum _SGX_INIT_OPERATION SGX_INIT_OP_ILLEGAL = 0, SGX_INIT_OP_WRITE_HW_REG, SGX_INIT_OP_READ_HW_REG, + SGX_INIT_OP_PRINT_HW_REG, #if defined(PDUMP) SGX_INIT_OP_PDUMP_HW_REG, #endif @@ -86,6 +89,10 @@ typedef struct _SGX_INIT_SCRIPTS_ SGX_INIT_COMMAND asInitCommandsPart1[SGX_MAX_INIT_COMMANDS]; SGX_INIT_COMMAND asInitCommandsPart2[SGX_MAX_INIT_COMMANDS]; SGX_INIT_COMMAND asDeinitCommands[SGX_MAX_DEINIT_COMMANDS]; +#if defined(SGX_FEATURE_MP) + SGX_INIT_COMMAND asSGXREGDebugCommandsPart1[SGX_MAX_PRINT_COMMANDS]; +#endif + SGX_INIT_COMMAND *apsSGXREGDebugCommandsPart2[SGX_FEATURE_MP_CORE_COUNT_3D]; } SGX_INIT_SCRIPTS; #if defined(__cplusplus) diff --git a/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c b/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c index 90d25c8..fdb8ce3 100644 --- a/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c +++ b/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c @@ -101,7 +101,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #undef BCE_USE_SET_MEMORY #endif -#if defined(__i386__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) && defined(SUPPORT_LINUX_X86_PAT) && defined(SUPPORT_LINUX_X86_WRITECOMBINE) +#if (defined(__i386__) || defined(__x86_64__)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) && defined(SUPPORT_LINUX_X86_PAT) && defined(SUPPORT_LINUX_X86_WRITECOMBINE) #include #define BCE_USE_SET_MEMORY #endif diff --git a/services4/3rdparty/dc_omapfb3_linux/3rdparty_dc_drm_shared.h b/services4/3rdparty/dc_omapfb3_linux/3rdparty_dc_drm_shared.h index addbfc2..b522c41 100644 --- a/services4/3rdparty/dc_omapfb3_linux/3rdparty_dc_drm_shared.h +++ b/services4/3rdparty/dc_omapfb3_linux/3rdparty_dc_drm_shared.h @@ -39,7 +39,6 @@ PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ /**************************************************************************/ #ifndef __3RDPARTY_DC_DRM_SHARED_H__ #define __3RDPARTY_DC_DRM_SHARED_H__ diff --git a/services4/3rdparty/dc_omapfb3_linux/Kbuild.mk b/services4/3rdparty/dc_omapfb3_linux/Kbuild.mk index eca9351..d442f79 100644 --- a/services4/3rdparty/dc_omapfb3_linux/Kbuild.mk +++ b/services4/3rdparty/dc_omapfb3_linux/Kbuild.mk @@ -36,13 +36,12 @@ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# ### ########################################################################### ccflags-y += \ -I$(TOP)/services4/3rdparty/dc_omapfb3_linux \ - -I$(KERNELDIR)/drivers/video/omap2 \ - -I$(KERNELDIR)/arch/arm/plat-omap/include + -Idrivers/video/omap2 \ + -Iarch/arm/plat-omap/include omaplfb-y += \ services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.o \ diff --git a/services4/3rdparty/dc_omapfb3_linux/Linux.mk b/services4/3rdparty/dc_omapfb3_linux/Linux.mk index 7574073..75d11a9 100644 --- a/services4/3rdparty/dc_omapfb3_linux/Linux.mk +++ b/services4/3rdparty/dc_omapfb3_linux/Linux.mk @@ -36,7 +36,6 @@ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# ### ########################################################################### modules := dc_omapfb3_linux diff --git a/services4/3rdparty/dc_omapfb3_linux/omaplfb.h b/services4/3rdparty/dc_omapfb3_linux/omaplfb.h index c69640d..0e5b8fb 100644 --- a/services4/3rdparty/dc_omapfb3_linux/omaplfb.h +++ b/services4/3rdparty/dc_omapfb3_linux/omaplfb.h @@ -37,7 +37,6 @@ PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ /**************************************************************************/ #ifndef __OMAPLFB_H__ #define __OMAPLFB_H__ @@ -66,6 +65,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define OMAPLFB_CONSOLE_UNLOCK() release_console_sem() #endif +#if defined(CONFIG_ION_OMAP) +#include +#include +#endif /* defined(CONFIG_ION_OMAP) */ + #define unref__ __attribute__ ((unused)) typedef void * OMAPLFB_HANDLE; @@ -227,6 +231,10 @@ typedef struct OMAPLFB_DEVINFO_TAG OMAPLFB_ATOMIC_BOOL sLeaveVT; #endif +#if defined(CONFIG_ION_OMAP) + struct ion_client *psIONClient; +#endif + } OMAPLFB_DEVINFO; #define OMAPLFB_PAGE_SIZE 4096 diff --git a/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c b/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c index 0c77e94..c2e87e4 100644 --- a/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c +++ b/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c @@ -37,7 +37,6 @@ PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ /**************************************************************************/ /************************************************************************** @@ -88,20 +87,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "omaplfb.h" #if defined(CONFIG_DSSCOMP) - -#if !defined(CONFIG_ION_OMAP) +#if defined(CONFIG_ION_OMAP) +extern struct ion_device *omap_ion_device; +#else /* defined(CONFIG_ION_OMAP) */ #error CONFIG_DSSCOMP support requires CONFIG_ION_OMAP -#endif - -#include -#include - -extern struct ion_client *gpsIONClient; - +#endif /* defined(CONFIG_ION_OMAP) */ +#if defined(CONFIG_DRM_OMAP_DMM_TILER) +#include <../drivers/staging/omapdrm/omap_dmm_tiler.h> +#include <../drivers/video/omap2/dsscomp/tiler-utils.h> +#elif defined(CONFIG_TI_TILER) #include +#else /* defined(CONFIG_DRM_OMAP_DMM_TILER) */ +#error CONFIG_DSSCOMP support requires either \ + CONFIG_DRM_OMAP_DMM_TILER or CONFIG_TI_TILER +#endif /* defined(CONFIG_DRM_OMAP_DMM_TILER) */ #include