jacinto6:sgx_src: updating ddk1.12@2917986 sources.
authorGowtham Tammana <g-tammana@ti.com>
Thu, 7 Aug 2014 19:28:10 +0000 (14:28 -0500)
committerGowtham Tammana <g-tammana@ti.com>
Thu, 7 Aug 2014 19:28:10 +0000 (14:28 -0500)
sgx_src is updated to DDK1.12@2917986 sources.

Change-Id: I3a5230100ea2d619a0626b9cd5dbb44458c15b85
Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
16 files changed:
jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/ion.mk [new file with mode: 0644]
jacinto6/sgx_src/eurasia_km/include4/pvrversion.h
jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h
jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.c

index b5dd7541caf2d3541a04b3793adaac21afa6d448..bb47c8df2f5891d59d756619246e2d16ec4ebea6 100644 (file)
@@ -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
index 51370efd23faf627ca4e611c22928e46414dabd1..088d47fb1b45374055c1e8416f4d90b082812055 100644 (file)
@@ -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
@@ -248,13 +249,6 @@ ifeq ($(is_at_least_kitkat),1)
 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
 #
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 (file)
index 0000000..f3f3c46
--- /dev/null
@@ -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
index ed4025f88b220483c6366aa9f838f441a9d8f362..a8dbd136e0501271dca6481e0d51af6d6b695c44 100644 (file)
@@ -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_ */
index 7a96e0ed53375350fde43627711d62b704e7f88c..6ae3618a798f76d7094fc178763d62c1da3b1724 100644 (file)
@@ -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);
index ea1fcaf319d781fca0d1746ea3b8966575ed7d3e..ac8e1e3f81a1c175e443ff98f7df81402a3bda3d 100644 (file)
@@ -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));
        }
 }
index 04b1748448e4a4cd99d17b45c9e7a058db09150e..8614c4518c82ee2b9990d00f1fa9b37cb0d09cf8 100644 (file)
@@ -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;
index 036f1bd7cbeeaacfcc7ecd8935ce680b2e68de3a..3bd66594fe3b862f433110faa3fd1ba3b81d9369 100644 (file)
@@ -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) */
index 042d3c4c49c4426f238ff5b450dc65b3f1997133..b71ecd7e394876a77ede711d0155e0093573252a 100644 (file)
@@ -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"
index a86de684c0a172647ebd46e7b3f62444710300e4..4c9cf9e214dab40ca216530aa2a204943a2117e0 100644 (file)
@@ -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;
                }
        }
index 6bcee26e3eb6210d847d0b59b6ddc3b8f75f54b1..a66e927369745d511e4cd81a67c0c38655aad306 100644 (file)
@@ -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)
index f2803abc024bd8cf5d416d496255d07f735b56de..c9b577eddbeddeef049c9da340712efc5c20e897 100644 (file)
@@ -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,
index 3485d8ae61c630a608f8fb70fc6388a0a41a8a3a..9b014dccd09a0d94471d13d1d8c1d63050f8eb6a 100644 (file)
@@ -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);
 
index 3aae69e232ee1977ba82f7eaf3ed2077b3c1c895..3a925ad871890e63053c6c594127e7ae60a58159 100644 (file)
@@ -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)) */
 
index 52b13bb576607d5937577a9fbf0ff6fadc203bd0..42c1f18de6ff68e994716c7a982742b1e86574dd 100644 (file)
@@ -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
index 36384bc1b675af621e47e0cf4d26f3cffc471b3a..3ebb7c85ff5de38f62685f2ea6235881d01aa59b 100644 (file)
@@ -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;