summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGowtham Tammana <g-tammana@ti.com>2014-08-07 14:28:10 -0500
committerGowtham Tammana <g-tammana@ti.com>2014-08-07 14:28:10 -0500
commit0de316f6e53cb060f331f53caf5863e1950abed6 (patch)
tree8425330d9c71a7d012a7a60197c11d79e7a64548
parent20f5811e841baa7be0ec10b121f3d2c562bd02f9 (diff)
downloadproprietary-open-jacinto-0de316f6e53cb060f331f53caf5863e1950abed6.tar.gz
jacinto6:sgx_src: updating ddk1.12@2917986 sources.
sgx_src is updated to DDK1.12@2917986 sources. Change-Id: I3a5230100ea2d619a0626b9cd5dbb44458c15b85 Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk2
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk10
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/ion.mk65
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvrversion.h6
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c8
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c10
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c29
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c25
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c118
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c8
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h5
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.c11
16 files changed, 215 insertions, 92 deletions
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 b5dd754..bb47c8d 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
@@ -50,3 +50,5 @@ $(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_ANDROID_SYSTRACE,))
$(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
$(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
+
+include ../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 51370ef..088d47f 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
@@ -186,8 +186,9 @@ endif
# We also need to support IMPLEMENTATION_DEFINED so gralloc allocates
# framebuffers and GPU buffers in a 'preferred' format.
#
-ifeq ($(is_at_least_jellybean_mr1),0)
+# FB HAL is still being used in TI post JB MR1 releases.
SUPPORT_ANDROID_FRAMEBUFFER_HAL := 1
+ifeq ($(is_at_least_jellybean_mr1),0)
else
PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED := 1
endif
@@ -249,13 +250,6 @@ PVR_ANDROID_REMAP_HW_ONLY_PIXEL_FORMATS := 1
endif
##############################################################################
-# Workaround for texture atlas "double registerBuffer" issue in KK
-#
-ifeq ($(is_at_least_kitkat),1)
-PVR_ANDROID_DONT_ENFORCE_SINGLE_REGISTER := 1
-endif
-
-##############################################################################
# Support newer HWC features in KK
#
ifeq ($(is_at_least_kitkat),1)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/ion.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/ion.mk
new file mode 100644
index 0000000..f3f3c46
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/ion.mk
@@ -0,0 +1,65 @@
+########################################################################### ###
+#@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 ($(KERNELDIR),)
+ifneq ($(SUPPORT_ION),)
+
+# Support kernels built out-of-tree with O=/other/path
+# In those cases, KERNELDIR will be O, not the source tree.
+ifneq ($(wildcard $(KERNELDIR)/source),)
+KSRCDIR := $(KERNELDIR)/source
+else
+KSRCDIR := $(KERNELDIR)
+endif
+
+ifneq ($(wildcard $(KSRCDIR)/drivers/staging/android/ion/ion.h),)
+# The kernel has a more recent version of ion, located in drivers/staging.
+# Change the default header paths and the behaviour wrt sg_dma_len.
+SUPPORT_ION_HEADER := \"../drivers/staging/android/ion/ion.h\"
+SUPPORT_ION_PRIV_HEADER := \"../drivers/staging/android/ion/ion_priv.h\"
+SUPPORT_ION_USE_SG_LENGTH := 1
+endif
+
+$(eval $(call TunableKernelConfigC,SUPPORT_ION_HEADER,\"linux/ion.h\"))
+$(eval $(call TunableKernelConfigC,SUPPORT_ION_PRIV_HEADER,\"../drivers/gpu/ion/ion_priv.h\"))
+$(eval $(call TunableKernelConfigC,SUPPORT_ION_USE_SG_LENGTH,))
+
+endif
+endif
diff --git a/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h b/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h
index ed4025f..a8dbd13 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h
@@ -53,7 +53,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define PVRVERSION_FAMILY "sgxddk"
#define PVRVERSION_BRANCHNAME "1.12"
-#define PVRVERSION_BUILD 2701748
+#define PVRVERSION_BUILD 2917986
#define PVRVERSION_BSCONTROL "SGX_DDK"
#define PVRVERSION_STRING "SGX_DDK sgxddk 1.12@" PVR_STR2(PVRVERSION_BUILD)
@@ -61,8 +61,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved."
-#define PVRVERSION_BUILD_HI 270
-#define PVRVERSION_BUILD_LO 1748
+#define PVRVERSION_BUILD_HI 291
+#define PVRVERSION_BUILD_LO 7986
#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/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c
index 7a96e0e..6ae3618 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c
@@ -1777,8 +1777,12 @@ static IMG_VOID FreePrivateData(IMG_HANDLE hCallbackData)
{
CALLBACK_DATA *psCallbackData = hCallbackData;
- OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, psCallbackData->ui32PrivDataLength,
- psCallbackData->pvPrivData, IMG_NULL);
+ if(psCallbackData->ui32PrivDataLength)
+ {
+ OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, psCallbackData->ui32PrivDataLength,
+ psCallbackData->pvPrivData, IMG_NULL);
+ }
+
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP,
sizeof(IMG_VOID *) * psCallbackData->ui32NumMemInfos,
psCallbackData->ppvMemInfos, IMG_NULL);
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c
index ea1fcaf..ac8e1e3 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c
@@ -177,13 +177,13 @@ IMG_VOID IMG_CALLCONV PVRSRVCompatCheckKM(PVRSRV_BRIDGE_IN_COMPAT_CHECK *psUserM
|| (psUserModeDDKDetails->ui32DDKBuild != PVRVERSION_BUILD))
{
psRetOUT->eError = PVRSRV_ERROR_DDK_VERSION_MISMATCH;
- PVR_DPF((PVR_DBG_ERROR, "(FAIL) UM-KM DDK Mismatch UM-(%d) KM-(%d).",
+ PVR_LOG(("(FAIL) UM-KM DDK Mismatch UM-(%d) KM-(%d).",
psUserModeDDKDetails->ui32DDKBuild, PVRVERSION_BUILD));
}
else
{
psRetOUT->eError = PVRSRV_OK;
- PVR_DPF((PVR_DBG_MESSAGE, "UM DDK-(%d) and KM DDK-(%d) match. [ OK ]",
+ PVR_LOG(("UM DDK-(%d) and KM DDK-(%d) match. [ OK ]",
psUserModeDDKDetails->ui32DDKBuild ,PVRVERSION_BUILD));
}
}
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c
index 04b1748..8614c45 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c
@@ -2710,7 +2710,7 @@ PVRSRV_ERROR SGXDevInitCompatCheck(PVRSRV_DEVICE_NODE *psDeviceNode)
/* Clear state (not strictly necessary since this is the first call) */
psSGXMiscInfoInt = psMemInfo->pvLinAddrKM;
- psSGXMiscInfoInt->ui32MiscInfoFlags = 0;
+ psSGXMiscInfoInt->ui32MiscInfoFlags &= ~PVRSRV_USSE_MISCINFO_GET_STRUCT_SIZES;
psSGXMiscInfoInt->ui32MiscInfoFlags |= PVRSRV_USSE_MISCINFO_GET_STRUCT_SIZES;
eError = SGXGetMiscInfoUkernel(psDevInfo, psDeviceNode, IMG_NULL);
@@ -2951,10 +2951,8 @@ PVRSRV_ERROR SGXGetMiscInfoKM(PVRSRV_SGXDEV_INFO *psDevInfo,
{
PVRSRV_ERROR eError;
PPVRSRV_KERNEL_MEM_INFO psMemInfo = psDevInfo->psKernelSGXMiscMemInfo;
- IMG_UINT32 *pui32MiscInfoFlags = &((PVRSRV_SGX_MISCINFO_INFO*)(psMemInfo->pvLinAddrKM))->ui32MiscInfoFlags;
-
- /* Reset the misc info state flags */
- *pui32MiscInfoFlags = 0;
+ IMG_UINT32 *pui32MiscInfoFlags;
+ pui32MiscInfoFlags = &((PVRSRV_SGX_MISCINFO_INFO*)(psMemInfo->pvLinAddrKM))->ui32MiscInfoFlags;
#if !defined(SUPPORT_SGX_EDM_MEMORY_DEBUG)
PVR_UNREFERENCED_PARAMETER(hDevMemContext);
@@ -3363,6 +3361,7 @@ PVRSRV_ERROR SGXGetMiscInfoKM(PVRSRV_SGXDEV_INFO *psDevInfo,
PVRSRV_SGX_MISCINFO_MEMACCESS *psSGXMemDest; /* user-defined mem write */
{
+ *pui32MiscInfoFlags &= ~PVRSRV_USSE_MISCINFO_MEMREAD;
/* Set the mem read flag; src is user-defined */
*pui32MiscInfoFlags |= PVRSRV_USSE_MISCINFO_MEMREAD;
psSGXMemSrc = &((PVRSRV_SGX_MISCINFO_INFO*)(psMemInfo->pvLinAddrKM))->sSGXMemAccessSrc;
@@ -3379,6 +3378,7 @@ PVRSRV_ERROR SGXGetMiscInfoKM(PVRSRV_SGXDEV_INFO *psDevInfo,
if( psMiscInfo->eRequest == SGX_MISC_INFO_REQUEST_MEMCOPY)
{
+ *pui32MiscInfoFlags &= ~PVRSRV_USSE_MISCINFO_MEMWRITE;
/* Set the mem write flag; dest is user-defined */
*pui32MiscInfoFlags |= PVRSRV_USSE_MISCINFO_MEMWRITE;
psSGXMemDest = &((PVRSRV_SGX_MISCINFO_INFO*)(psMemInfo->pvLinAddrKM))->sSGXMemAccessDest;
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c
index 036f1bd..3bd6659 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c
@@ -119,9 +119,31 @@ IMG_VOID IonDeinit(IMG_VOID)
#else /* defined(CONFIG_ION_SUNXI) */
+#if defined(CONFIG_ION_INCDHAD1)
+
+/* Real ion with sharing (incdhad1) */
+
+extern struct ion_device *incdhad1_ion_device;
+struct ion_device *gpsIonDev;
+
+PVRSRV_ERROR IonInit(IMG_VOID)
+{
+ gpsIonDev = incdhad1_ion_device;
+ return PVRSRV_OK;
+}
+
+
+IMG_VOID IonDeinit(IMG_VOID)
+{
+ gpsIonDev = IMG_NULL;
+}
+
+#else /* defined(CONFIG_ION_INCDHAD1) */
+
/* "Reference" ion implementation */
-#include "../drivers/gpu/ion/ion_priv.h"
+#include SUPPORT_ION_PRIV_HEADER
+#include <linux/version.h>
static struct ion_heap **gapsIonHeaps;
struct ion_device *gpsIonDev;
@@ -138,6 +160,9 @@ static struct ion_platform_data gsGenericConfig =
{
.nr = 3,
.heaps =
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,39))
+ (struct ion_platform_heap [])
+#endif
{
{
.type = ION_HEAP_TYPE_SYSTEM_CONTIG,
@@ -216,6 +241,8 @@ IMG_VOID IonDeinit(IMG_VOID)
ion_device_destroy(gpsIonDev);
}
+#endif /* defined(CONFIG_ION_INCDHAD1) */
+
#endif /* defined(CONFIG_ION_SUNXI) */
#endif /* defined(CONFIG_ION_S5P) */
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h
index 042d3c4..b71ecd7 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h
@@ -44,7 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#if defined(SUPPORT_ION)
-#include <linux/ion.h>
+#include SUPPORT_ION_HEADER
#include "img_types.h"
#include "servicesext.h"
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c
index a86de68..4c9cf9e 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c
@@ -476,13 +476,14 @@ PVR_MOD_STATIC void PVRSRVDriverShutdown(LDM_DEV *pDevice)
if (!bDriverIsShutdown && !bDriverIsSuspended)
{
+#if defined(ANDROID)
/*
* Take the bridge mutex, and never release it, to stop
* processes trying to use the driver after it has been
* shutdown.
*/
LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
-
+#endif
(void) PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D3);
}
@@ -542,16 +543,30 @@ PVR_MOD_STATIC int PVRSRVDriverSuspend(LDM_DEV *pDevice, pm_message_t state)
if (!bDriverIsSuspended && !bDriverIsShutdown)
{
+#if defined(ANDROID)
+ /*
+ * The bridge mutex will be held until we resume.
+ * The lock doesn't need to be taken on (non-Android)
+ * Linux systems, as all user processes will have been
+ * suspended at this point. In any case, taking the mutex
+ * may result in possible lock ordering problems being
+ * flagged up by the kernel, as the Linux console lock may
+ * have already been taken at this point. If the 3rd party
+ * display driver is Linux Framebuffer based, the previous
+ * locking order may have been bridge mutex first, followed
+ * by the console lock.
+ */
LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
-
+#endif
if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D3) == PVRSRV_OK)
{
- /* The bridge mutex will be held until we resume */
bDriverIsSuspended = IMG_TRUE;
}
else
{
+#if defined(ANDROID)
LinuxUnLockMutex(&gPVRSRVLock);
+#endif
res = -EINVAL;
}
}
@@ -602,11 +617,15 @@ PVR_MOD_STATIC int PVRSRVDriverResume(LDM_DEV *pDevice)
if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D0) == PVRSRV_OK)
{
bDriverIsSuspended = IMG_FALSE;
+#if defined(ANDROID)
LinuxUnLockMutex(&gPVRSRVLock);
+#endif
}
else
{
+#if defined(ANDROID)
/* The bridge mutex is not released on failure */
+#endif
res = -EINVAL;
}
}
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h
index 6bcee26..a66e927 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h
@@ -64,7 +64,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#if defined(__arm__) || defined(__sh__)
#define PGPROT_WC(pv) pgprot_writecombine(pv)
#elif defined(__mips__)
- #define PGPROT_WC(pv) pgprot_noncached_wa(pv)
+ #define PGPROT_WC(pv) pgprot_writecombine(pv)
#elif defined(__i386__) || defined(__x86_64)
/* PAT support supersedes this */
#define PGPROT_WC(pv) pgprot_noncached(pv)
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c
index f2803ab..c9b577e 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c
@@ -859,29 +859,25 @@ static irqreturn_t DeviceISRWrapper(int irq, void *dev_id
#endif
)
{
- PVRSRV_DEVICE_NODE *psDeviceNode;
+ PVRSRV_DEVICE_NODE *psDeviceNode = (PVRSRV_DEVICE_NODE*)dev_id;
+ SYS_DATA *psSysData = psDeviceNode->psSysData;
+ ENV_DATA *psEnvData = (ENV_DATA *)psSysData->pvEnvSpecificData;
IMG_BOOL bStatus = IMG_FALSE;
PVR_UNREFERENCED_PARAMETER(irq);
-
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
PVR_UNREFERENCED_PARAMETER(regs);
#endif
- psDeviceNode = (PVRSRV_DEVICE_NODE*)dev_id;
- if(!psDeviceNode)
- {
- PVR_DPF((PVR_DBG_ERROR, "DeviceISRWrapper: invalid params\n"));
- goto out;
- }
- bStatus = PVRSRVDeviceLISR(psDeviceNode);
-
- if (bStatus)
+ if (psEnvData->bLISRInstalled)
{
- OSScheduleMISR((IMG_VOID *)psDeviceNode->psSysData);
+ bStatus = PVRSRVDeviceLISR(psDeviceNode);
+ if (bStatus)
+ {
+ OSScheduleMISR((IMG_VOID *)psSysData);
+ }
}
-out:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
return bStatus ? IRQ_HANDLED : IRQ_NONE;
#endif
@@ -908,7 +904,8 @@ static irqreturn_t SystemISRWrapper(int irq, void *dev_id
#endif
)
{
- SYS_DATA *psSysData;
+ SYS_DATA *psSysData = (SYS_DATA *)dev_id;
+ ENV_DATA *psEnvData = (ENV_DATA *)psSysData->pvEnvSpecificData;
IMG_BOOL bStatus = IMG_FALSE;
PVR_UNREFERENCED_PARAMETER(irq);
@@ -916,21 +913,16 @@ static irqreturn_t SystemISRWrapper(int irq, void *dev_id
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
PVR_UNREFERENCED_PARAMETER(regs);
#endif
- psSysData = (SYS_DATA *)dev_id;
- if(!psSysData)
- {
- PVR_DPF((PVR_DBG_ERROR, "SystemISRWrapper: invalid params\n"));
- goto out;
- }
- bStatus = PVRSRVSystemLISR(psSysData);
-
- if (bStatus)
+ if (psEnvData->bLISRInstalled)
{
- OSScheduleMISR((IMG_VOID *)psSysData);
+ bStatus = PVRSRVSystemLISR(psSysData);
+ if (bStatus)
+ {
+ OSScheduleMISR((IMG_VOID *)psSysData);
+ }
}
-out:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
return bStatus ? IRQ_HANDLED : IRQ_NONE;
#endif
@@ -1011,10 +1003,10 @@ PVRSRV_ERROR OSUninstallDeviceLISR(IMG_VOID *pvSysData)
PVR_TRACE(("Uninstalling device LISR on IRQ %d with cookie %p", psEnvData->ui32IRQ, psEnvData->pvISRCookie));
- free_irq(psEnvData->ui32IRQ, psEnvData->pvISRCookie);
-
psEnvData->bLISRInstalled = IMG_FALSE;
+ free_irq(psEnvData->ui32IRQ, psEnvData->pvISRCookie);
+
return PVRSRV_OK;
}
@@ -1091,10 +1083,10 @@ PVRSRV_ERROR OSUninstallSystemLISR(IMG_VOID *pvSysData)
PVR_TRACE(("Uninstalling system LISR on IRQ %d with cookie %p", psEnvData->ui32IRQ, psEnvData->pvISRCookie));
- free_irq(psEnvData->ui32IRQ, psEnvData->pvISRCookie);
-
psEnvData->bLISRInstalled = IMG_FALSE;
+ free_irq(psEnvData->ui32IRQ, psEnvData->pvISRCookie);
+
return PVRSRV_OK;
}
@@ -4406,6 +4398,7 @@ IMG_BOOL OSInvalidateCPUCacheRangeKM(IMG_HANDLE hOSMemHandle,
}
#elif defined(__mips__)
+
/*
* dmac cache functions are supposed to be used for dma
* memory which comes from dma-able memory. However examining
@@ -4415,50 +4408,65 @@ IMG_BOOL OSInvalidateCPUCacheRangeKM(IMG_HANDLE hOSMemHandle,
*
*/
+static inline size_t pvr_dma_range_len(const void *pvStart, const void *pvEnd)
+{
+ return (size_t)((char *)pvEnd - (char *)pvStart);
+}
+
+static void pvr_dma_cache_wback_inv(const void *pvStart, const void *pvEnd)
+{
+ size_t uLength = pvr_dma_range_len(pvStart, pvEnd);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
+ dma_cache_sync(NULL, (void *)pvStart, uLength, DMA_BIDIRECTIONAL);
+#else
+ dma_cache_wback_inv((unsigned long)pvStart, uLength);
+#endif
+}
+
+static void pvr_dma_cache_wback(const void *pvStart, const void *pvEnd)
+{
+ size_t uLength = pvr_dma_range_len(pvStart, pvEnd);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
+ dma_cache_sync(NULL, (void *)pvStart, uLength, DMA_TO_DEVICE);
+#else
+ dma_cache_wback((unsigned long)pvStart, uLength);
+#endif
+}
+
+static void pvr_dma_cache_inv(const void *pvStart, const void *pvEnd)
+{
+ size_t uLength = pvr_dma_range_len(pvStart, pvEnd);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
+ dma_cache_sync(NULL, (void *)pvStart, uLength, DMA_FROM_DEVICE);
+#else
+ dma_cache_inv((unsigned long)pvStart, uLength);
+#endif
+}
+
IMG_VOID OSCleanCPUCacheKM(IMG_VOID)
{
/* dmac functions flush full cache if size is larger than
- * p-cache size. This is a workaround for the fact that
+ * {s,d}-cache size. This is a workaround for the fact that
* __flush_cache_all is not an exported symbol. Please
* replace with custom function if available in latest
* version of linux being used.
* Arbitrary large number (1MB) which should be larger than
- * mips p-cache sizes for some time in future.
+ * mips {s,d}-cache sizes for some time in future.
* */
- dma_cache_wback(0, 0x100000);
+ pvr_dma_cache_wback(0, (const void *)0x200000);
}
IMG_VOID OSFlushCPUCacheKM(IMG_VOID)
{
/* dmac functions flush full cache if size is larger than
- * p-cache size. This is a workaround for the fact that
+ * {s,d}-cache size. This is a workaround for the fact that
* __flush_cache_all is not an exported symbol. Please
* replace with custom function if available in latest
* version of linux being used.
* Arbitrary large number (1MB) which should be larger than
- * mips p-cache sizes for some time in future.
+ * mips {s,d}-cache sizes for some time in future.
* */
- dma_cache_wback_inv(0, 0x100000);
-}
-
-static inline IMG_UINT32 pvr_dma_range_len(const void *pvStart, const void *pvEnd)
-{
- return (IMG_UINT32)((char *)pvEnd - (char *)pvStart);
-}
-
-static void pvr_dma_cache_wback_inv(const void *pvStart, const void *pvEnd)
-{
- dma_cache_wback_inv((IMG_UINTPTR_T)pvStart, pvr_dma_range_len(pvStart, pvEnd));
-}
-
-static void pvr_dma_cache_wback(const void *pvStart, const void *pvEnd)
-{
- dma_cache_wback((IMG_UINTPTR_T)pvStart, pvr_dma_range_len(pvStart, pvEnd));
-}
-
-static void pvr_dma_cache_inv(const void *pvStart, const void *pvEnd)
-{
- dma_cache_inv((IMG_UINTPTR_T)pvStart, pvr_dma_range_len(pvStart, pvEnd));
+ pvr_dma_cache_wback_inv(0, (const void *)0x200000);
}
IMG_BOOL OSFlushCPUCacheRangeKM(IMG_HANDLE hOSMemHandle,
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c
index 3485d8a..9b014dc 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c
@@ -114,6 +114,14 @@ PVRSRV_ERROR OSPerProcessPrivateDataDeInit(IMG_HANDLE hOsPrivateData)
psEnvPerProc = (PVRSRV_ENV_PER_PROCESS_DATA *)hOsPrivateData;
+#if defined(SUPPORT_ION)
+ if (psEnvPerProc->psIONClient)
+ {
+ ion_client_destroy(psEnvPerProc->psIONClient);
+ psEnvPerProc->psIONClient = IMG_NULL;
+ }
+#endif /* defined(SUPPORT_ION) */
+
/* Linux specific mmap processing */
LinuxMMapPerProcessDisconnect(psEnvPerProc);
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c
index 3aae69e..3a925ad 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c
@@ -480,7 +480,9 @@ static const struct file_operations sPVRFileOps =
PVR_DRM_FOPS_IOCTL = drm_ioctl,
.mmap = PVRMMap,
.poll = drm_poll,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0))
.fasync = drm_fasync,
+#endif
};
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) */
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h b/jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h
index 52b13bb..42c1f18 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h
+++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h
@@ -350,6 +350,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define FIX_HW_BRN_36513 /* workaround in uKernel and Services */
#else
#if SGX_CORE_REV == 116
+ #if defined(SGX_FEATURE_MP)
+ #if SGX_FEATURE_MP_CORE_COUNT == 1
+ #define FIX_HW_BRN_33809/* workaround in kernel (enable burst combiner) */
+ #endif
+ #endif
#if defined(SUPPORT_SGX_LOW_LATENCY_SCHEDULING) && defined(SGX_FEATURE_MP)
#define FIX_HW_BRN_33657/* workaround in ukernel */
#endif
diff --git a/jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.c b/jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.c
index 36384bc..3ebb7c8 100644
--- a/jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.c
+++ b/jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.c
@@ -533,9 +533,6 @@ PVRSRV_ERROR SysInitialise(IMG_VOID)
return PVRSRV_OK;
}
-#if defined(CONFIG_OMAPLFB)
-int OMAPLFBRegisterPVRDriver(void * pfnFuncTable);
-#endif
/*!
******************************************************************************
@@ -599,14 +596,6 @@ PVRSRV_ERROR SysFinalise(IMG_VOID)
DisableSGXClocks(gpsSysData);
#endif /* SUPPORT_ACTIVE_POWER_MANAGEMENT */
-#if defined(CONFIG_OMAPLFB)
- if (OMAPLFBRegisterPVRDriver((void *)&PVRGetDisplayClassJTable) != 0)
- {
- PVR_DPF((PVR_DBG_ERROR,"SysFinalise: Failed to register PVR driver with omaplfb"));
- return PVRSRV_ERROR_INIT_FAILURE;
- }
-#endif
-
gpsSysSpecificData->bSGXInitComplete = IMG_TRUE;
return eError;