summaryrefslogtreecommitdiffstats
path: root/pvr-source/services4/srvkm/devices/sgx/sgxinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'pvr-source/services4/srvkm/devices/sgx/sgxinit.c')
-rw-r--r--pvr-source/services4/srvkm/devices/sgx/sgxinit.c13
1 files changed, 8 insertions, 5 deletions
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;
}
}