summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHemant Hariyani <hemanthariyani@ti.com>2013-07-03 15:14:18 -0700
committerHashcode <hashcode0f@gmail.com>2015-02-06 11:00:32 -0800
commit236af44d2574763532288a063f7745ebd2432b5f (patch)
tree3e92c8856dc82938600d174ad08446cc0e1b71ce
parent391c312c8964088c512de2cfb1e29c78d245d06b (diff)
downloadhardware_ti_omap4-236af44d2574763532288a063f7745ebd2432b5f.zip
hardware_ti_omap4-236af44d2574763532288a063f7745ebd2432b5f.tar.gz
hardware_ti_omap4-236af44d2574763532288a063f7745ebd2432b5f.tar.bz2
SGX-BIN: DDK binaries and KM source 1.9@2291151
Includes new pixel formats. Change-Id: I4a56e6bff9c477610f2ce30706831f66dcc9c651
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk4
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/features.mk7
-rw-r--r--pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile7
-rw-r--r--pvr-source/include4/pvrversion.h6
-rw-r--r--pvr-source/services4/include/servicesint.h1
-rw-r--r--pvr-source/services4/include/sgx_mkif_km.h1
-rw-r--r--pvr-source/services4/include/sgxinfo.h4
-rw-r--r--pvr-source/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c45
-rw-r--r--pvr-source/services4/srvkm/common/deviceclass.c3
-rw-r--r--pvr-source/services4/srvkm/common/devicemem.c12
-rw-r--r--pvr-source/services4/srvkm/common/queue.c9
-rw-r--r--pvr-source/services4/srvkm/devices/sgx/sgxinfokm.h4
-rw-r--r--pvr-source/services4/srvkm/devices/sgx/sgxinit.c13
-rw-r--r--pvr-source/services4/srvkm/devices/sgx/sgxkick.c19
-rw-r--r--pvr-source/services4/srvkm/devices/sgx/sgxpower.c34
-rw-r--r--pvr-source/services4/srvkm/devices/sgx/sgxutils.c14
-rw-r--r--pvr-source/services4/srvkm/env/linux/event.c2
-rw-r--r--pvr-source/services4/srvkm/env/linux/ion.c2
-rw-r--r--pvr-source/services4/srvkm/env/linux/mmap.c20
-rw-r--r--pvr-source/services4/srvkm/env/linux/module.c8
-rw-r--r--pvr-source/services4/srvkm/env/linux/mutex.c10
-rw-r--r--pvr-source/services4/srvkm/env/linux/mutex.h7
-rw-r--r--pvr-source/services4/srvkm/env/linux/osfunc.c6
-rw-r--r--pvr-source/services4/srvkm/env/linux/pvr_bridge_k.c4
-rw-r--r--pvr-source/services4/srvkm/hwdefs/sgxerrata.h27
-rw-r--r--pvr-source/services4/system/omap4/sgxfreq_userspace.c58
-rw-r--r--pvr-source/services4/system/omap4/sysconfig.c4
-rw-r--r--pvr-source/services4/system/omap4/sysutils_linux.c1
28 files changed, 154 insertions, 178 deletions
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk b/pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk
index 6e16b14..23f9175 100644
--- a/pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk
+++ b/pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk
@@ -39,7 +39,9 @@
### ###########################################################################
SYS_CFLAGS := \
- -fno-short-enums -D__linux__ \
+ -fno-short-enums \
+ -funwind-tables \
+ -D__linux__ \
-I$(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \
-I$(ANDROID_ROOT)/bionic/libc/include \
-I$(ANDROID_ROOT)/bionic/libc/kernel/common \
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/features.mk b/pvr-source/eurasiacon/build/linux2/common/android/features.mk
index 18bc370..8a60fb7 100644
--- a/pvr-source/eurasiacon/build/linux2/common/android/features.mk
+++ b/pvr-source/eurasiacon/build/linux2/common/android/features.mk
@@ -312,6 +312,13 @@ ifeq ($(is_at_least_jellybean),0)
PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
endif
+##############################################################################
+# JB added a new corkscrew API for userland backtracing.
+#
+ifeq ($(is_at_least_jellybean),1)
+PVR_ANDROID_HAS_CORKSCREW_API := 1
+endif
+
# Placeholder for future version handling
#
ifeq ($(is_future_version),1)
diff --git a/pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile b/pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile
index b034ea0..2b37cb3 100644
--- a/pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile
+++ b/pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile
@@ -52,6 +52,13 @@ else ifeq ($(TARGET_SGX),544)
SGX_FEATURE_MP := 1
SGX_FEATURE_SYSTEM_CACHE := 1
SGX_FEATURE_MP_CORE_COUNT := 2
+else ifeq ($(TARGET_SGX),544es2)
+ SGXCORE := 544
+ SGX_CORE_REV := 116
+ HAL_VARIANT := omap5
+ SGX_FEATURE_MP := 1
+ SGX_FEATURE_SYSTEM_CACHE := 1
+ SGX_FEATURE_MP_CORE_COUNT := 2
else
#default config
SGXCORE := 540
diff --git a/pvr-source/include4/pvrversion.h b/pvr-source/include4/pvrversion.h
index 820b25a..933ed79 100644
--- a/pvr-source/include4/pvrversion.h
+++ b/pvr-source/include4/pvrversion.h
@@ -54,7 +54,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define PVRVERSION_FAMILY "sgxddk"
#define PVRVERSION_BRANCHNAME "1.9"
-#define PVRVERSION_BUILD 2166536
+#define PVRVERSION_BUILD 2291151
#define PVRVERSION_BSCONTROL "SGX_DDK_Android"
#define PVRVERSION_STRING "SGX_DDK_Android sgxddk 19 1.9@" PVR_STR2(PVRVERSION_BUILD)
@@ -62,8 +62,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 216
-#define PVRVERSION_BUILD_LO 6536
+#define PVRVERSION_BUILD_HI 229
+#define PVRVERSION_BUILD_LO 1151
#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/pvr-source/services4/include/servicesint.h b/pvr-source/services4/include/servicesint.h
index 5b39093..7b09afb 100644
--- a/pvr-source/services4/include/servicesint.h
+++ b/pvr-source/services4/include/servicesint.h
@@ -49,7 +49,6 @@ extern "C" {
#include "services.h"
#include "sysinfo.h"
-#include "sysconfig.h"
#define HWREC_DEFAULT_TIMEOUT (500)
diff --git a/pvr-source/services4/include/sgx_mkif_km.h b/pvr-source/services4/include/sgx_mkif_km.h
index 3a9866f..265440a 100644
--- a/pvr-source/services4/include/sgx_mkif_km.h
+++ b/pvr-source/services4/include/sgx_mkif_km.h
@@ -144,6 +144,7 @@ typedef struct _SGXMKIF_HOST_CTL_
#endif
IMG_UINT32 ui32OpenCLDelayCount; /* Counter to keep track OpenCL task completion time in units of regular task time out events */
+ IMG_UINT32 ui32InterruptCount;
} SGXMKIF_HOST_CTL;
/*
diff --git a/pvr-source/services4/include/sgxinfo.h b/pvr-source/services4/include/sgxinfo.h
index 17f6d95..3f888cb 100644
--- a/pvr-source/services4/include/sgxinfo.h
+++ b/pvr-source/services4/include/sgxinfo.h
@@ -172,10 +172,6 @@ typedef struct _SGX_BRIDGE_INIT_INFO_
#endif
#endif
-#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && defined(FIX_HW_BRN_31559)
- IMG_HANDLE hKernelVDMSnapShotBufferMemInfo;
- IMG_HANDLE hKernelVDMCtrlStreamBufferMemInfo;
-#endif
#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && \
defined(FIX_HW_BRN_33657) && defined(SUPPORT_SECURE_33657_FIX)
IMG_HANDLE hKernelVDMStateUpdateBufferMemInfo;
diff --git a/pvr-source/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c b/pvr-source/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c
index bee5dc6..84c7e10 100644
--- a/pvr-source/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c
+++ b/pvr-source/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c
@@ -1463,25 +1463,6 @@ SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
}
#endif
-#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && defined(FIX_HW_BRN_31559)
- eError = PVRSRVLookupHandle(psPerProc->psHandleBase,
- &hDummy,
- psSGXDevInitPart2IN->sInitInfo.hKernelVDMSnapShotBufferMemInfo,
- PVRSRV_HANDLE_TYPE_MEM_INFO);
- if (eError != PVRSRV_OK)
- {
- bLookupFailed = IMG_TRUE;
- }
-
- eError = PVRSRVLookupHandle(psPerProc->psHandleBase,
- &hDummy,
- psSGXDevInitPart2IN->sInitInfo.hKernelVDMCtrlStreamBufferMemInfo,
- PVRSRV_HANDLE_TYPE_MEM_INFO);
- if (eError != PVRSRV_OK)
- {
- bLookupFailed = IMG_TRUE;
- }
-#endif
#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && \
defined(FIX_HW_BRN_33657) && defined(SUPPORT_SECURE_33657_FIX)
eError = PVRSRVLookupHandle(psPerProc->psHandleBase,
@@ -1820,25 +1801,6 @@ SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
bReleaseFailed = IMG_TRUE;
}
#endif
-#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && defined(FIX_HW_BRN_31559)
- eError = PVRSRVLookupAndReleaseHandle(psPerProc->psHandleBase,
- &psSGXDevInitPart2IN->sInitInfo.hKernelVDMSnapShotBufferMemInfo,
- psSGXDevInitPart2IN->sInitInfo.hKernelVDMSnapShotBufferMemInfo,
- PVRSRV_HANDLE_TYPE_MEM_INFO);
- if (eError != PVRSRV_OK)
- {
- bReleaseFailed = IMG_TRUE;
- }
-
- eError = PVRSRVLookupAndReleaseHandle(psPerProc->psHandleBase,
- &psSGXDevInitPart2IN->sInitInfo.hKernelVDMCtrlStreamBufferMemInfo,
- psSGXDevInitPart2IN->sInitInfo.hKernelVDMCtrlStreamBufferMemInfo,
- PVRSRV_HANDLE_TYPE_MEM_INFO);
- if (eError != PVRSRV_OK)
- {
- bReleaseFailed = IMG_TRUE;
- }
-#endif
#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && \
defined(FIX_HW_BRN_33657) && defined(SUPPORT_SECURE_33657_FIX)
eError = PVRSRVLookupAndReleaseHandle(psPerProc->psHandleBase,
@@ -2136,13 +2098,6 @@ SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
#endif
#endif
-#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && defined(FIX_HW_BRN_31559)
- eError = PVRSRVDissociateDeviceMemKM(hDevCookieInt, psSGXDevInitPart2IN->sInitInfo.hKernelVDMSnapShotBufferMemInfo);
- bDissociateFailed |= (IMG_BOOL)(eError != PVRSRV_OK);
-
- eError = PVRSRVDissociateDeviceMemKM(hDevCookieInt, psSGXDevInitPart2IN->sInitInfo.hKernelVDMCtrlStreamBufferMemInfo);
- bDissociateFailed |= (IMG_BOOL)(eError != PVRSRV_OK);
-#endif
#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && \
defined(FIX_HW_BRN_33657) && defined(SUPPORT_SECURE_33657_FIX)
eError = PVRSRVDissociateDeviceMemKM(hDevCookieInt, psSGXDevInitPart2IN->sInitInfo.hKernelVDMStateUpdateBufferMemInfo);
diff --git a/pvr-source/services4/srvkm/common/deviceclass.c b/pvr-source/services4/srvkm/common/deviceclass.c
index d047c78..4c54d1d 100644
--- a/pvr-source/services4/srvkm/common/deviceclass.c
+++ b/pvr-source/services4/srvkm/common/deviceclass.c
@@ -1,4 +1,5 @@
/*************************************************************************/ /*!
+@File
@Title Device class services functions
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
@Description Kernel services functions for device class devices
@@ -1428,7 +1429,7 @@ PVRSRV_ERROR PVRSRVCreateDCSwapChainKM (PVRSRV_PER_PROCESS_DATA *psPerProc,
psSwapChain->ui32RefCount = 1;
psSwapChain->ui32Flags = ui32Flags;
- /* Save pointer in DC structure if ti's shared struct */
+ /* Save pointer in DC structure if it's shared struct */
if( ui32Flags & PVRSRV_CREATE_SWAPCHAIN_SHARED )
{
if(! psDCInfo->psDCSwapChainShared )
diff --git a/pvr-source/services4/srvkm/common/devicemem.c b/pvr-source/services4/srvkm/common/devicemem.c
index 872c0ba..5496753 100644
--- a/pvr-source/services4/srvkm/common/devicemem.c
+++ b/pvr-source/services4/srvkm/common/devicemem.c
@@ -1759,6 +1759,18 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVWrapExtMemoryKM(IMG_HANDLE hDevCookie,
*/
bPhysContig = IMG_FALSE;
}
+ else
+ {
+ if (psExtSysPAddr)
+ {
+ PVR_DPF((PVR_DBG_ERROR, "PVRSRVWrapExtMemoryKM: invalid parameter, physical address passing is not supported"));
+ }
+ else
+ {
+ PVR_DPF((PVR_DBG_ERROR, "PVRSRVWrapExtMemoryKM: invalid parameter, no address specificed"));
+ }
+ return PVRSRV_ERROR_INVALID_PARAMS;
+ }
/* Choose the heap to map to */
psDevMemoryInfo = &((BM_CONTEXT*)hDevMemContext)->psDeviceNode->sDevMemoryInfo;
diff --git a/pvr-source/services4/srvkm/common/queue.c b/pvr-source/services4/srvkm/common/queue.c
index 88b05a4..09892e3 100644
--- a/pvr-source/services4/srvkm/common/queue.c
+++ b/pvr-source/services4/srvkm/common/queue.c
@@ -1082,10 +1082,13 @@ PVRSRV_ERROR PVRSRVProcessCommand(SYS_DATA *psSysData,
*/
psCmdCompleteData->bInUse = IMG_FALSE;
eError = PVRSRV_ERROR_CMD_NOT_PROCESSED;
+ PVR_LOG(("Failed to submit command from queue processor, this could cause sync wedge!"));
+ }
+ else
+ {
+ /* Increment the CCB offset */
+ psDeviceCommandData[psCommand->CommandType].ui32CCBOffset = (ui32CCBOffset + 1) % DC_NUM_COMMANDS_PER_TYPE;
}
-
- /* Increment the CCB offset */
- psDeviceCommandData[psCommand->CommandType].ui32CCBOffset = (ui32CCBOffset + 1) % DC_NUM_COMMANDS_PER_TYPE;
return eError;
}
diff --git a/pvr-source/services4/srvkm/devices/sgx/sgxinfokm.h b/pvr-source/services4/srvkm/devices/sgx/sgxinfokm.h
index 125da09..b143347 100644
--- a/pvr-source/services4/srvkm/devices/sgx/sgxinfokm.h
+++ b/pvr-source/services4/srvkm/devices/sgx/sgxinfokm.h
@@ -155,10 +155,6 @@ typedef struct _PVRSRV_SGXDEV_INFO_
#if defined(FIX_HW_BRN_29823)
PPVRSRV_KERNEL_MEM_INFO psKernelDummyTermStreamMemInfo; /*!< Meminfo for dummy terminate stream */
#endif
-#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && defined(FIX_HW_BRN_31559)
- PPVRSRV_KERNEL_MEM_INFO psKernelVDMSnapShotBufferMemInfo; /*!< Meminfo for dummy snapshot buffer */
- PPVRSRV_KERNEL_MEM_INFO psKernelVDMCtrlStreamBufferMemInfo; /*!< Meminfo for dummy control stream */
-#endif
#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && \
defined(FIX_HW_BRN_33657) && defined(SUPPORT_SECURE_33657_FIX)
PPVRSRV_KERNEL_MEM_INFO psKernelVDMStateUpdateBufferMemInfo; /*!< Meminfo for state update buffer */
diff --git a/pvr-source/services4/srvkm/devices/sgx/sgxinit.c b/pvr-source/services4/srvkm/devices/sgx/sgxinit.c
index 199aa9d..cc86c4f 100644
--- a/pvr-source/services4/srvkm/devices/sgx/sgxinit.c
+++ b/pvr-source/services4/srvkm/devices/sgx/sgxinit.c
@@ -68,6 +68,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "srvkm.h"
#include "ttrace.h"
+IMG_UINT32 g_ui32HostIRQCountSample = 0;
extern int powering_down;
#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG)
@@ -243,10 +244,6 @@ static PVRSRV_ERROR InitDevInfo(PVRSRV_PER_PROCESS_DATA *psPerProc,
#if defined(FIX_HW_BRN_29823)
psDevInfo->psKernelDummyTermStreamMemInfo = (PVRSRV_KERNEL_MEM_INFO *)psInitInfo->hKernelDummyTermStreamMemInfo;
#endif
-#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && defined(FIX_HW_BRN_31559)
- psDevInfo->psKernelVDMSnapShotBufferMemInfo = (PVRSRV_KERNEL_MEM_INFO *)psInitInfo->hKernelVDMSnapShotBufferMemInfo;
- psDevInfo->psKernelVDMCtrlStreamBufferMemInfo = (PVRSRV_KERNEL_MEM_INFO *)psInitInfo->hKernelVDMCtrlStreamBufferMemInfo;
-#endif
#if defined(SGX_FEATURE_VDM_CONTEXT_SWITCH) && \
defined(FIX_HW_BRN_33657) && defined(SUPPORT_SECURE_33657_FIX)
psDevInfo->psKernelVDMStateUpdateBufferMemInfo = (PVRSRV_KERNEL_MEM_INFO *)psInitInfo->hKernelVDMStateUpdateBufferMemInfo;
@@ -1884,11 +1881,17 @@ IMG_BOOL SGX_ISRHandler (IMG_VOID *pvData)
/* Clear master interrupt bit */
ui32EventClear |= EUR_CR_EVENT_HOST_CLEAR_MASTER_INTERRUPT_MASK;
+ /* clear the events */
if(!powering_down) {
- /* clear the events */
OSWriteHWReg(psDevInfo->pvRegsBaseKM, EUR_CR_EVENT_HOST_CLEAR, ui32EventClear);
OSWriteHWReg(psDevInfo->pvRegsBaseKM, EUR_CR_EVENT_HOST_CLEAR2, ui32EventClear2);
}
+
+ /*
+ Sample the current count from the uKernel _after_ we've cleared the
+ interrupt.
+ */
+ g_ui32HostIRQCountSample = psDevInfo->psSGXHostCtl->ui32InterruptCount;
}
}
diff --git a/pvr-source/services4/srvkm/devices/sgx/sgxkick.c b/pvr-source/services4/srvkm/devices/sgx/sgxkick.c
index 584f538..a40bb9e 100644
--- a/pvr-source/services4/srvkm/devices/sgx/sgxkick.c
+++ b/pvr-source/services4/srvkm/devices/sgx/sgxkick.c
@@ -645,6 +645,25 @@ PVRSRV_ERROR SGXDoKickKM(IMG_HANDLE hDevHandle, SGX_CCB_KICK *psCCBKick)
MAKEUNIQUETAG(psCCBMemInfo));
}
+ if (psCCBKick->hTA3DSyncInfo != IMG_NULL)
+ {
+ psSyncInfo = (PVRSRV_KERNEL_SYNC_INFO *)psCCBKick->hTA3DSyncInfo;
+
+ PDUMPCOMMENT("Modify TA/3D dependency WOpPendingVal\r\n");
+
+ PDUMPMEM(&psSyncInfo->psSyncData->ui32LastOpDumpVal,
+ psCCBMemInfo,
+ psCCBKick->ui32CCBDumpWOff + offsetof(SGXMKIF_CMDTA_SHARED, sTA3DDependency.ui32WriteOpsPendingVal),
+ sizeof(IMG_UINT32),
+ 0,
+ MAKEUNIQUETAG(psCCBMemInfo));
+
+ if (psCCBKick->bTADependency)
+ {
+ psSyncInfo->psSyncData->ui32LastOpDumpVal++;
+ }
+ }
+
if (psCCBKick->hTASyncInfo != IMG_NULL)
{
psSyncInfo = (PVRSRV_KERNEL_SYNC_INFO *)psCCBKick->hTASyncInfo;
diff --git a/pvr-source/services4/srvkm/devices/sgx/sgxpower.c b/pvr-source/services4/srvkm/devices/sgx/sgxpower.c
index 2acd28d..034deab 100644
--- a/pvr-source/services4/srvkm/devices/sgx/sgxpower.c
+++ b/pvr-source/services4/srvkm/devices/sgx/sgxpower.c
@@ -48,9 +48,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "sgxutils.h"
#include "pdump_km.h"
+extern IMG_UINT32 g_ui32HostIRQCountSample;
int powering_down = 0;
-
#if defined(SUPPORT_HW_RECOVERY)
static PVRSRV_ERROR SGXAddTimer(PVRSRV_DEVICE_NODE *psDeviceNode,
SGX_TIMING_INFORMATION *psSGXTimingInfo,
@@ -359,7 +359,11 @@ PVRSRV_ERROR SGXPrePowerState (IMG_HANDLE hDevHandle,
}
#endif /* NO_HARDWARE */
- psDevInfo->bSGXIdle = IMG_TRUE;
+ if (psDevInfo->bSGXIdle == IMG_FALSE)
+ {
+ psDevInfo->bSGXIdle = IMG_TRUE;
+ SysSGXIdleEntered();
+ }
#if defined(PDUMP)
PDUMPCOMMENT("TA/3D CCB Control - Wait for power event on uKernel.");
@@ -372,6 +376,20 @@ PVRSRV_ERROR SGXPrePowerState (IMG_HANDLE hDevHandle,
MAKEUNIQUETAG(psDevInfo->psKernelSGXHostCtlMemInfo));
#endif /* PDUMP */
+ /* Wait for the pending ukernel to host interrupts to come back. */
+ #if !defined(NO_HARDWARE)
+ if (PollForValueKM(&g_ui32HostIRQCountSample,
+ psDevInfo->psSGXHostCtl->ui32InterruptCount,
+ 0xffffffff,
+ MAX_HW_TIME_US,
+ MAX_HW_TIME_US/WAIT_TRY_COUNT,
+ IMG_FALSE) != PVRSRV_OK)
+ {
+ PVR_DPF((PVR_DBG_ERROR,"SGXPrePowerState: Wait for pending interrupts failed."));
+ SGXDumpDebugInfo(psDevInfo, IMG_FALSE);
+ PVR_DBG_BREAK;
+ }
+ #endif /* NO_HARDWARE */
#if defined(SGX_FEATURE_MP)
ui32CoresEnabled = ((OSReadHWReg(psDevInfo->pvRegsBaseKM, EUR_CR_MASTER_CORE) & EUR_CR_MASTER_CORE_ENABLE_MASK) >> EUR_CR_MASTER_CORE_ENABLE_SHIFT) + 1;
#else
@@ -548,6 +566,18 @@ PVRSRV_ERROR SGXPreClockSpeedChange (IMG_HANDLE hDevHandle,
return eError;
}
}
+ else
+ {
+ #if defined(SUPPORT_HW_RECOVERY)
+ PVRSRV_ERROR eError;
+
+ eError = OSDisableTimer(psDevInfo->hTimer);
+ if (eError != PVRSRV_OK)
+ {
+ PVR_DPF((PVR_DBG_ERROR,"SGXStartTimer : Failed to enable host timer"));
+ }
+ #endif /* SUPPORT_HW_RECOVERY */
+ }
}
PVR_DPF((PVR_DBG_MESSAGE,"SGXPreClockSpeedChange: SGX clock speed was %uHz",
diff --git a/pvr-source/services4/srvkm/devices/sgx/sgxutils.c b/pvr-source/services4/srvkm/devices/sgx/sgxutils.c
index 227675d..d5cb3c1 100644
--- a/pvr-source/services4/srvkm/devices/sgx/sgxutils.c
+++ b/pvr-source/services4/srvkm/devices/sgx/sgxutils.c
@@ -172,9 +172,11 @@ IMG_VOID SGXTestActivePowerEvent (PVRSRV_DEVICE_NODE *psDeviceNode,
((psSGXHostCtl->ui32InterruptFlags & PVRSRV_USSE_EDM_INTERRUPT_IDLE) != 0))
{
psSGXHostCtl->ui32InterruptClearFlags |= PVRSRV_USSE_EDM_INTERRUPT_IDLE;
- psDevInfo->bSGXIdle = IMG_TRUE;
-
- SysSGXIdleEntered();
+ if (psDevInfo->bSGXIdle == IMG_FALSE)
+ {
+ psDevInfo->bSGXIdle = IMG_TRUE;
+ SysSGXIdleEntered();
+ }
}
/*
@@ -709,9 +711,6 @@ PVRSRV_ERROR SGXScheduleCCBCommandKM(PVRSRV_DEVICE_NODE *psDeviceNode,
/* Note that a power-up has been dumped in the init phase. */
PDUMPSUSPEND();
- SysSGXCommandPending(psDevInfo->bSGXIdle);
- psDevInfo->bSGXIdle = IMG_FALSE;
-
/* Ensure that SGX is powered up before kicking the ukernel. */
eError = PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId.ui32DeviceIndex,
PVRSRV_DEV_POWER_STATE_ON);
@@ -729,6 +728,9 @@ PVRSRV_ERROR SGXScheduleCCBCommandKM(PVRSRV_DEVICE_NODE *psDeviceNode,
return eError;
}
+ SysSGXCommandPending(psDevInfo->bSGXIdle);
+ psDevInfo->bSGXIdle = IMG_FALSE;
+
eError = SGXScheduleCCBCommand(psDeviceNode, eCmdType, psCommandData, ui32CallerID, ui32PDumpFlags, hDevMemContext, bLastInScene);
PVRSRVPowerUnlock(ui32CallerID);
diff --git a/pvr-source/services4/srvkm/env/linux/event.c b/pvr-source/services4/srvkm/env/linux/event.c
index b70a79d..c335640 100644
--- a/pvr-source/services4/srvkm/env/linux/event.c
+++ b/pvr-source/services4/srvkm/env/linux/event.c
@@ -396,7 +396,7 @@ PVRSRV_ERROR LinuxEventObjectWait(IMG_HANDLE hOSEventObject, IMG_UINT32 ui32MSTi
ui32TimeOutJiffies = (IMG_UINT32)schedule_timeout((IMG_INT32)ui32TimeOutJiffies);
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
#if defined(DEBUG)
psLinuxEventObject->ui32Stats++;
#endif
diff --git a/pvr-source/services4/srvkm/env/linux/ion.c b/pvr-source/services4/srvkm/env/linux/ion.c
index 3e772bc..e84fdc4 100644
--- a/pvr-source/services4/srvkm/env/linux/ion.c
+++ b/pvr-source/services4/srvkm/env/linux/ion.c
@@ -74,7 +74,7 @@ int PVRSRVExportFDToIONHandles(int fd, struct ion_client **client,
int ret = -EINVAL;
/* Take the bridge mutex so the handle won't be freed underneath us */
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
psFile = fget(fd);
if(!psFile)
diff --git a/pvr-source/services4/srvkm/env/linux/mmap.c b/pvr-source/services4/srvkm/env/linux/mmap.c
index 1a485c4..495031a 100644
--- a/pvr-source/services4/srvkm/env/linux/mmap.c
+++ b/pvr-source/services4/srvkm/env/linux/mmap.c
@@ -408,7 +408,7 @@ PVRMMapOSMemHandleToMMapData(PVRSRV_PER_PROCESS_DATA *psPerProc,
IMG_HANDLE hOSMemHandle;
PVRSRV_ERROR eError;
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
PVR_ASSERT(PVRSRVGetMaxHandle(psPerProc->psHandleBase) <= MAX_MMAP_HANDLE);
@@ -567,7 +567,7 @@ PVRMMapReleaseMMapData(PVRSRV_PER_PROCESS_DATA *psPerProc,
PVRSRV_ERROR eError;
IMG_UINT32 ui32PID = OSGetCurrentProcessIDKM();
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
PVR_ASSERT(PVRSRVGetMaxHandle(psPerProc->psHandleBase) <= MAX_MMAP_HANDLE);
@@ -869,7 +869,7 @@ MMapVOpenNoLock(struct vm_area_struct* ps_vma)
static void
MMapVOpen(struct vm_area_struct* ps_vma)
{
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
MMapVOpenNoLock(ps_vma);
@@ -914,7 +914,7 @@ MMapVCloseNoLock(struct vm_area_struct* ps_vma)
static void
MMapVClose(struct vm_area_struct* ps_vma)
{
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
MMapVCloseNoLock(ps_vma);
@@ -936,7 +936,7 @@ static int MMapVAccess(struct vm_area_struct *ps_vma, unsigned long addr,
int iRetVal = -EINVAL;
IMG_VOID *pvKernelAddr;
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
psOffsetStruct = (PKV_OFFSET_STRUCT)ps_vma->vm_private_data;
psLinuxMemArea = psOffsetStruct->psLinuxMemArea;
@@ -1022,7 +1022,7 @@ PVRMMap(struct file* pFile, struct vm_area_struct* ps_vma)
PVR_UNREFERENCED_PARAMETER(pFile);
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
ui32ByteSize = ps_vma->vm_end - ps_vma->vm_start;
@@ -1200,7 +1200,7 @@ static void ProcSeqStartstopMMapRegistations(struct seq_file *sfile,IMG_BOOL sta
{
if(start)
{
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
}
else
{
@@ -1361,7 +1361,7 @@ PVRMMapRegisterArea(LinuxMemArea *psLinuxMemArea)
const IMG_CHAR *pszName = LinuxMemAreaTypeToString(LinuxMemAreaRootType(psLinuxMemArea));
#endif
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
#if defined(DEBUG) || defined(DEBUG_LINUX_MMAP_AREAS)
PVR_DPF((PVR_DBG_MESSAGE,
@@ -1426,7 +1426,7 @@ PVRMMapRemoveRegisteredArea(LinuxMemArea *psLinuxMemArea)
PVRSRV_ERROR eError;
PKV_OFFSET_STRUCT psOffsetStruct, psTmpOffsetStruct;
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
PVR_ASSERT(psLinuxMemArea->bMMapRegistered);
@@ -1519,7 +1519,7 @@ LinuxMMapPerProcessDisconnect(PVRSRV_ENV_PER_PROCESS_DATA *psEnvPerProc)
PVR_UNREFERENCED_PARAMETER(psEnvPerProc);
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
list_for_each_entry_safe(psOffsetStruct, psTmpOffsetStruct, &g_sMMapOffsetStructList, sMMapItem)
{
diff --git a/pvr-source/services4/srvkm/env/linux/module.c b/pvr-source/services4/srvkm/env/linux/module.c
index 487069d..4465f36 100644
--- a/pvr-source/services4/srvkm/env/linux/module.c
+++ b/pvr-source/services4/srvkm/env/linux/module.c
@@ -482,7 +482,7 @@ PVR_MOD_STATIC void PVRSRVDriverShutdown(LDM_DEV *pDevice)
* processes trying to use the driver after it has been
* shutdown.
*/
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
(void) PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D3);
}
@@ -543,7 +543,7 @@ PVR_MOD_STATIC int PVRSRVDriverSuspend(LDM_DEV *pDevice, pm_message_t state)
if (!bDriverIsSuspended && !bDriverIsShutdown)
{
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D3) == PVRSRV_OK)
{
@@ -734,7 +734,7 @@ static int PVRSRVOpen(struct inode unref__ * pInode, struct file *pFile)
PVRSRV_ENV_PER_PROCESS_DATA *psEnvPerProc;
#endif
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
ui32PID = OSGetCurrentProcessIDKM();
@@ -805,7 +805,7 @@ static int PVRSRVRelease(struct inode unref__ * pInode, struct file *pFile)
PVRSRV_FILE_PRIVATE_DATA *psPrivateData;
int err = 0;
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
#if defined(SUPPORT_DRI_DRM)
psPrivateData = (PVRSRV_FILE_PRIVATE_DATA *)pvPrivData;
diff --git a/pvr-source/services4/srvkm/env/linux/mutex.c b/pvr-source/services4/srvkm/env/linux/mutex.c
index 2cd666f..a7e6c12 100644
--- a/pvr-source/services4/srvkm/env/linux/mutex.c
+++ b/pvr-source/services4/srvkm/env/linux/mutex.c
@@ -66,6 +66,11 @@ IMG_VOID LinuxLockMutex(PVRSRV_LINUX_MUTEX *psPVRSRVMutex)
mutex_lock(psPVRSRVMutex);
}
+IMG_VOID LinuxLockMutexNested(PVRSRV_LINUX_MUTEX *psPVRSRVMutex, unsigned int uiLockClass)
+{
+ mutex_lock_nested(psPVRSRVMutex, uiLockClass);
+}
+
PVRSRV_ERROR LinuxLockMutexInterruptible(PVRSRV_LINUX_MUTEX *psPVRSRVMutex)
{
if(mutex_lock_interruptible(psPVRSRVMutex) == -EINTR)
@@ -109,6 +114,11 @@ IMG_VOID LinuxLockMutex(PVRSRV_LINUX_MUTEX *psPVRSRVMutex)
atomic_dec(&psPVRSRVMutex->Count);
}
+IMG_VOID LinuxLockMutexNested(PVRSRV_LINUX_MUTEX *psPVRSRVMutex, unsigned int uiLockClass)
+{
+ LinuxLockMutex(psPVRSRVMutex);
+}
+
PVRSRV_ERROR LinuxLockMutexInterruptible(PVRSRV_LINUX_MUTEX *psPVRSRVMutex)
{
if(down_interruptible(&psPVRSRVMutex->sSemaphore) == -EINTR)
diff --git a/pvr-source/services4/srvkm/env/linux/mutex.h b/pvr-source/services4/srvkm/env/linux/mutex.h
index c590da1..816cf4a 100644
--- a/pvr-source/services4/srvkm/env/linux/mutex.h
+++ b/pvr-source/services4/srvkm/env/linux/mutex.h
@@ -72,11 +72,18 @@ typedef struct {
#endif
+enum PVRSRV_MUTEX_LOCK_CLASS
+{
+ PVRSRV_LOCK_CLASS_BRIDGE,
+ PVRSRV_LOCK_CLASS_MMAP,
+};
extern IMG_VOID LinuxInitMutex(PVRSRV_LINUX_MUTEX *psPVRSRVMutex);
extern IMG_VOID LinuxLockMutex(PVRSRV_LINUX_MUTEX *psPVRSRVMutex);
+extern IMG_VOID LinuxLockMutexNested(PVRSRV_LINUX_MUTEX *psPVRSRVMutex, unsigned int uiLockClass);
+
extern PVRSRV_ERROR LinuxLockMutexInterruptible(PVRSRV_LINUX_MUTEX *psPVRSRVMutex);
extern IMG_INT32 LinuxTryLockMutex(PVRSRV_LINUX_MUTEX *psPVRSRVMutex);
diff --git a/pvr-source/services4/srvkm/env/linux/osfunc.c b/pvr-source/services4/srvkm/env/linux/osfunc.c
index ac03185..4c39621 100644
--- a/pvr-source/services4/srvkm/env/linux/osfunc.c
+++ b/pvr-source/services4/srvkm/env/linux/osfunc.c
@@ -4079,7 +4079,7 @@ IMG_BOOL CheckExecuteCacheOp(IMG_HANDLE hOSMemHandle,
PVR_ASSERT(psLinuxMemArea != IMG_NULL);
- LinuxLockMutex(&g_sMMapMutex);
+ LinuxLockMutexNested(&g_sMMapMutex, PVRSRV_LOCK_CLASS_MMAP);
psMMapOffsetStructList = &psLinuxMemArea->sMMapOffsetStructList;
ui32AreaLength = psLinuxMemArea->ui32ByteSize;
@@ -4609,7 +4609,7 @@ IMG_VOID OSReleaseBridgeLock(IMG_VOID)
IMG_VOID OSReacquireBridgeLock(IMG_VOID)
{
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
}
typedef struct _OSTime
@@ -4627,7 +4627,7 @@ PVRSRV_ERROR OSTimeCreateWithUSOffset(IMG_PVOID *pvRet, IMG_UINT32 ui32USOffset)
return PVRSRV_ERROR_OUT_OF_MEMORY;
}
- psOSTime->ulTime = usecs_to_jiffies(jiffies_to_usecs(jiffies) + ui32USOffset);
+ psOSTime->ulTime = jiffies + usecs_to_jiffies(ui32USOffset);
*pvRet = psOSTime;
return PVRSRV_OK;
}
diff --git a/pvr-source/services4/srvkm/env/linux/pvr_bridge_k.c b/pvr-source/services4/srvkm/env/linux/pvr_bridge_k.c
index 5d1ad8c..23379b9 100644
--- a/pvr-source/services4/srvkm/env/linux/pvr_bridge_k.c
+++ b/pvr-source/services4/srvkm/env/linux/pvr_bridge_k.c
@@ -141,7 +141,7 @@ static void ProcSeqStartstopBridgeStats(struct seq_file *sfile,IMG_BOOL start)
{
if(start)
{
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
}
else
{
@@ -253,7 +253,7 @@ PVRSRV_BridgeDispatchKM(struct file *pFile, unsigned int unref__ ioctlCmd, unsig
PVRSRV_PER_PROCESS_DATA *psPerProc;
IMG_INT err = -EFAULT;
- LinuxLockMutex(&gPVRSRVLock);
+ LinuxLockMutexNested(&gPVRSRVLock, PVRSRV_LOCK_CLASS_BRIDGE);
#if defined(SUPPORT_DRI_DRM)
psBridgePackageKM = (PVRSRV_BRIDGE_PACKAGE *)arg;
diff --git a/pvr-source/services4/srvkm/hwdefs/sgxerrata.h b/pvr-source/services4/srvkm/hwdefs/sgxerrata.h
index 711e356..437fbc6 100644
--- a/pvr-source/services4/srvkm/hwdefs/sgxerrata.h
+++ b/pvr-source/services4/srvkm/hwdefs/sgxerrata.h
@@ -224,9 +224,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define FIX_HW_BRN_31272/* workaround in services (srvclient) and uKernel */
#define FIX_HW_BRN_31278/* disabled prefetching in MMU */
#define FIX_HW_BRN_31542/* workaround in uKernel and Services */
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31620/* workaround in services */
#define FIX_HW_BRN_31780/* workaround in uKernel */
#define FIX_HW_BRN_32044 /* workaround in uKernel, services and client drivers */
@@ -243,9 +240,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define FIX_HW_BRN_31195/* workaround in services */
#define FIX_HW_BRN_31272/* workaround in services (srvclient) and uKernel */
#define FIX_HW_BRN_31278/* disabled prefetching in MMU */
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31542/* workaround in uKernel and Services */
#define FIX_HW_BRN_31671/* workaround in uKernel */
#define FIX_HW_BRN_31780/* workaround in uKernel */
@@ -260,9 +254,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#else
#if SGX_CORE_REV == 141
#define FIX_HW_BRN_29954/* turns off regbank split feature */
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31671 /* workaround in uKernel */
#define FIX_HW_BRN_31780/* workaround in uKernel */
#if defined(SUPPORT_SGX_LOW_LATENCY_SCHEDULING) && defined(SGX_FEATURE_MP)
@@ -273,9 +264,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#else
#if SGX_CORE_REV == 142
#define FIX_HW_BRN_29954/* turns off regbank split feature */
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31671 /* workaround in uKernel */
#define FIX_HW_BRN_31780/* workaround in uKernel */
#if defined(SUPPORT_SGX_LOW_LATENCY_SCHEDULING) && defined(SGX_FEATURE_MP)
@@ -291,9 +279,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define FIX_HW_BRN_31272/* workaround in services (srvclient) and uKernel */
#define FIX_HW_BRN_31278/* disabled prefetching in MMU */
#define FIX_HW_BRN_31542/* workaround in uKernel and Services */
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31620/* workaround in services */
#define FIX_HW_BRN_31780/* workaround in uKernel */
#define FIX_HW_BRN_32044 /* workaround in uKernel, services and client drivers */
@@ -307,9 +292,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#else
#if SGX_CORE_REV == 213
#define FIX_HW_BRN_31272/* workaround in services (srvclient) and uKernel */
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31671 /* workaround in uKernel */
#define FIX_HW_BRN_31780/* workaround in uKernel */
#define FIX_HW_BRN_32085 /* workaround in services: prefetch fix applied, investigating PT based fix */
@@ -372,9 +354,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define FIX_HW_BRN_31195/* workaround in services */
#define FIX_HW_BRN_31272/* workaround in services (srvclient) and uKernel */
#define FIX_HW_BRN_31278/* disabled prefetching in MMU */
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31542 /* workaround in uKernel and Services */
#define FIX_HW_BRN_31620/* workaround in services */
#define FIX_HW_BRN_31671 /* workaround in uKernel */
@@ -388,9 +367,6 @@ 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 == 105
- #if defined(SGX_FEATURE_MP)
- #define FIX_HW_BRN_31559/* workaround in services and uKernel */
- #endif
#define FIX_HW_BRN_31780/* workaround in uKernel */
#if defined(SUPPORT_SGX_LOW_LATENCY_SCHEDULING) && defined(SGX_FEATURE_MP)
#define FIX_HW_BRN_33657/* workaround in ukernel*/
@@ -421,7 +397,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#if defined(SUPPORT_SGX_LOW_LATENCY_SCHEDULING) && defined(SGX_FEATURE_MP)
#define FIX_HW_BRN_33657/* workaround in ukernel */
#endif
- #define FIX_HW_BRN_33809/* workaround in kernel (enable burst combiner) */
+ //FIXME: This causes DMM/EMIF lockup
+ //#define FIX_HW_BRN_33809/* workaround in kernel (enable burst combiner) */
#define FIX_HW_BRN_36513 /* workaround in uKernel and Services */
#else
#if SGX_CORE_REV == SGX_CORE_REV_HEAD
diff --git a/pvr-source/services4/system/omap4/sgxfreq_userspace.c b/pvr-source/services4/system/omap4/sgxfreq_userspace.c
index 5ff0dd0..aff6087 100644
--- a/pvr-source/services4/system/omap4/sgxfreq_userspace.c
+++ b/pvr-source/services4/system/omap4/sgxfreq_userspace.c
@@ -20,26 +20,17 @@
static int userspace_start(struct sgxfreq_sgx_data *data);
static void userspace_stop(void);
-static void userspace_sgx_clk_on(void);
-static void userspace_sgx_clk_off(void);
-static void userspace_sgx_active(void);
-static void userspace_sgx_idle(void);
static struct sgxfreq_governor userspace_gov = {
.name = "userspace",
.gov_start = userspace_start,
.gov_stop = userspace_stop,
- .sgx_clk_on = userspace_sgx_clk_on,
- .sgx_clk_off = userspace_sgx_clk_off,
- .sgx_active = userspace_sgx_active,
- .sgx_idle = userspace_sgx_idle,
};
static struct userspace_data {
- unsigned long freq_user; /* in KHz */
- struct mutex mutex;
+ unsigned long freq_user; /* in Hz */
} usd;
@@ -65,15 +56,11 @@ static ssize_t store_frequency_set(struct device *dev,
if (ret != 1)
return -EINVAL;
- mutex_lock(&odd.mutex);
-
if (freq > sgxfreq_get_freq_max())
freq = sgxfreq_get_freq_max();
usd.freq_user = sgxfreq_set_freq_request(freq);
trace_printk("USERSPACE: new freq=%luHz.\n", usd.freq_user);
- mutex_unlock(&odd.mutex);
-
return count;
}
@@ -100,8 +87,6 @@ int userspace_init(void)
{
int ret;
- mutex_init(&odd.mutex);
-
ret = sgxfreq_register_governor(&userspace_gov);
if (ret)
return ret;
@@ -133,48 +118,7 @@ static int userspace_start(struct sgxfreq_sgx_data *data)
static void userspace_stop(void)
{
- usd.freq_user = sgxfreq_set_freq_request(sgxfreq_get_freq_min());
sysfs_remove_group(sgxfreq_kobj, &userspace_attr_group);
trace_printk("USERSPACE: stopped.\n");
}
-
-
-static void userspace_sgx_clk_on(void)
-{
- mutex_lock(&ood.mutex);
-
- sgxfreq_set_freq_request(usd.freq_user);
-
- mutex_unlock(&ood.mutex);
-}
-
-
-static void userspace_sgx_clk_off(void)
-{
- mutex_lock(&ood.mutex);
-
- sgxfreq_set_freq_request(sgxfreq_get_freq_min());
-
- mutex_unlock(&ood.mutex);
-}
-
-
-static void userspace_sgx_active(void)
-{
- mutex_lock(&aid.mutex);
-
- sgxfreq_set_freq_request(usd.freq_user);
-
- mutex_unlock(&aid.mutex);
-}
-
-
-static void userspace_sgx_idle(void)
-{
- mutex_lock(&aid.mutex);
-
- sgxfreq_set_freq_request(sgxfreq_get_freq_min());
-
- mutex_unlock(&aid.mutex);
-}
diff --git a/pvr-source/services4/system/omap4/sysconfig.c b/pvr-source/services4/system/omap4/sysconfig.c
index e9fd069..175252d 100644
--- a/pvr-source/services4/system/omap4/sysconfig.c
+++ b/pvr-source/services4/system/omap4/sysconfig.c
@@ -50,7 +50,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "ocpdefs.h"
+#if (SGX_CORE_REV == 105)
#define OMAP5430_CORE_REV 0x10005
+#elif (SGX_CORE_REV == 116)
+#define OMAP5430_CORE_REV 0x10106
+#endif
/* top level system data anchor point*/
SYS_DATA* gpsSysData = (SYS_DATA*)IMG_NULL;
diff --git a/pvr-source/services4/system/omap4/sysutils_linux.c b/pvr-source/services4/system/omap4/sysutils_linux.c
index 1bef2ee..bae1048 100644
--- a/pvr-source/services4/system/omap4/sysutils_linux.c
+++ b/pvr-source/services4/system/omap4/sysutils_linux.c
@@ -738,6 +738,7 @@ IMG_VOID SysSGXIdleEntered(IMG_VOID)
IMG_VOID SysSGXCommandPending(IMG_BOOL bSGXIdle)
{
#if defined(SYS_OMAP4_HAS_DVFS_FRAMEWORK)
+ if (bSGXIdle)
sgxfreq_notif_sgx_active();
#else
PVR_UNREFERENCED_PARAMETER(bSGXIdle);