aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImagination Technologies Ltd <gpl-support@imgtec.com>2011-07-20 18:00:23 +0100
committerErik Gilling <konkers@android.com>2011-07-25 15:28:02 -0700
commit420d34fdef159a6359b9905204d539369d80d690 (patch)
treede9bd752d2a94b5a4d18003d1f30e153862a99ac
parentc009999a0ec56900a11f067af62a2626c60f2432 (diff)
downloadkernel_samsung_tuna-420d34fdef159a6359b9905204d539369d80d690.zip
kernel_samsung_tuna-420d34fdef159a6359b9905204d539369d80d690.tar.gz
kernel_samsung_tuna-420d34fdef159a6359b9905204d539369d80d690.tar.bz2
gpu: pvr: Update to DDK 1.8.18.927
- Finish off "multiple readers" work. HWC deadlocks should be fixed.
-rw-r--r--drivers/gpu/pvr/Makefile31
-rw-r--r--drivers/gpu/pvr/deviceclass.c8
-rw-r--r--drivers/gpu/pvr/pvrversion.h4
-rw-r--r--drivers/gpu/pvr/queue.c98
-rw-r--r--drivers/gpu/pvr/servicesint.h43
5 files changed, 115 insertions, 69 deletions
diff --git a/drivers/gpu/pvr/Makefile b/drivers/gpu/pvr/Makefile
index ebfde4a..593217b 100644
--- a/drivers/gpu/pvr/Makefile
+++ b/drivers/gpu/pvr/Makefile
@@ -1,44 +1,29 @@
-
ccflags-y = -DLINUX -D__linux__ -DANDROID -DPVR_BUILD_DIR="\"omap4430_android\""
ccflags-y += -Idrivers/gpu/pvr -Idrivers/gpu/pvr/omap4 -Idrivers/video/omap2
ccflags-y += \
- -DSUPPORT_SGX_NEW_STATUS_VALS \
- -DSUPPORT_SGX_HWPERF \
- -DSYS_USING_INTERRUPTS \
- -DPVR_SECURE_HANDLES
-
-ccflags-y += \
- -DSERVICES4 \
- -DSUPPORT_SGX_EVENT_OBJECT \
- -DTRANSFER_QUEUE
-
-ccflags-y += \
-DSUPPORT_SGX \
+ -DTRANSFER_QUEUE \
-DSGX_DYNAMIC_TIMING_INFO \
- -DSUPPORT_SRVINIT \
-DSUPPORT_HW_RECOVERY \
- -DPVR_SECURE_FD_EXPORT \
- -DSUPPORT_SGX_EVENT_OBJECT \
-DLDM_PLATFORM \
- -DPVR2D_ALT_2DHW \
- -DSUPPORT_SGX_LOW_LATENCY_SCHEDULING \
+ -DSUPPORT_SGX_NEW_STATUS_VALS \
+ -DSUPPORT_SGX_HWPERF \
+ -DSYS_USING_INTERRUPTS \
+ -DPVR_SECURE_HANDLES \
-DPVR_LINUX_USING_WORKQUEUES \
-DPVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE \
-DPVR_LINUX_TIMERS_USING_WORKQUEUES \
-DSYS_CUSTOM_POWERLOCK_WRAP \
- -DSUPPORT_CPU_CACHED_BUFFERS \
- -DSUPPORT_CACHEFLUSH_ON_ALLOC \
-DPVR_NO_FULL_CACHE_OPS \
-DSUPPORT_MEMINFO_IDS \
-DDISPLAY_CONTROLLER=omaplfb \
-DSYS_SGX_ACTIVE_POWER_LATENCY_MS=100 \
- -DPVR_PROC_USE_SEQ_FILE \
- -DPVR_BUILD_DATE="" \
-DPVRSRV_MODNAME="\"pvrsrvkm\"" \
-DPVR_LDM_DRIVER_REGISTRATION_NAME="\"pvrsrvkm\"" \
- -Idrivers/gpu/pvr/sgx \
- -DSUPPORT_OMAP_TILER
+ -DSUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED \
+ -DSUPPORT_OMAP_TILER \
+ -Idrivers/gpu/pvr/sgx
ccflags-$(CONFIG_PVR_SGXCORE_540) += \
-DSGX540 -DSUPPORT_SGX540 \
diff --git a/drivers/gpu/pvr/deviceclass.c b/drivers/gpu/pvr/deviceclass.c
index 78523fc..a4230d4 100644
--- a/drivers/gpu/pvr/deviceclass.c
+++ b/drivers/gpu/pvr/deviceclass.c
@@ -68,8 +68,10 @@ typedef struct PVRSRV_DC_SWAPCHAIN_TAG
PVRSRV_DC_BUFFER *psLastFlipBuffer;
IMG_UINT32 ui32MinSwapInterval;
IMG_UINT32 ui32MaxSwapInterval;
+#if !defined(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED)
PVRSRV_KERNEL_SYNC_INFO **ppsLastSyncInfos;
IMG_UINT32 ui32LastNumSyncInfos;
+#endif
struct PVRSRV_DISPLAYCLASS_INFO_TAG *psDCInfo;
struct PVRSRV_DC_SWAPCHAIN_TAG *psNext;
} PVRSRV_DC_SWAPCHAIN;
@@ -877,11 +879,13 @@ static PVRSRV_ERROR DestroyDCSwapChain(PVRSRV_DC_SWAPCHAIN *psSwapChain)
}
}
+#if !defined(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED)
if (psSwapChain->ppsLastSyncInfos)
{
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(PVRSRV_KERNEL_SYNC_INFO *) * psSwapChain->ui32LastNumSyncInfos,
psSwapChain->ppsLastSyncInfos, IMG_NULL);
}
+#endif
OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(PVRSRV_DC_SWAPCHAIN), psSwapChain, IMG_NULL);
@@ -1551,6 +1555,7 @@ PVRSRV_ERROR PVRSRVSwapToDCBuffer2KM(IMG_HANDLE hDeviceKM,
psQueue = psSwapChain->psQueue;
+#if !defined(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED)
if(psSwapChain->ppsLastSyncInfos)
{
IMG_UINT32 ui32NumUniqueSyncInfos = psSwapChain->ui32LastNumSyncInfos;
@@ -1591,6 +1596,7 @@ PVRSRV_ERROR PVRSRVSwapToDCBuffer2KM(IMG_HANDLE hDeviceKM,
}
}
else
+#endif
{
ppsCompiledSyncInfos = ppsSyncInfos;
ui32NumCompiledSyncInfos = ui32NumMemSyncInfos;
@@ -1683,6 +1689,7 @@ PVRSRV_ERROR PVRSRVSwapToDCBuffer2KM(IMG_HANDLE hDeviceKM,
goto Exit;
}
+#if !defined(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED)
if (psSwapChain->ui32LastNumSyncInfos < ui32NumMemSyncInfos)
{
@@ -1708,6 +1715,7 @@ PVRSRV_ERROR PVRSRVSwapToDCBuffer2KM(IMG_HANDLE hDeviceKM,
{
psSwapChain->ppsLastSyncInfos[i] = ppsSyncInfos[i];
}
+#endif
Exit:
if (psCallbackData)
diff --git a/drivers/gpu/pvr/pvrversion.h b/drivers/gpu/pvr/pvrversion.h
index e07c1cd..0129695 100644
--- a/drivers/gpu/pvr/pvrversion.h
+++ b/drivers/gpu/pvr/pvrversion.h
@@ -36,7 +36,7 @@
#define PVRVERSION_FAMILY "eurasiacon.pj"
#define PVRVERSION_BRANCHNAME "1.8.18"
-#define PVRVERSION_BUILD 919
+#define PVRVERSION_BUILD 927
#define PVRVERSION_BSCONTROL "Unknown"
#define PVRVERSION_STRING "1.8.18." PVR_STR2(PVRVERSION_BUILD)
@@ -45,7 +45,7 @@
#define COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved."
#define PVRVERSION_BUILD_HI 18
-#define PVRVERSION_BUILD_LO 919
+#define PVRVERSION_BUILD_LO 927
#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/drivers/gpu/pvr/queue.c b/drivers/gpu/pvr/queue.c
index 5983237..a2c1dd4 100644
--- a/drivers/gpu/pvr/queue.c
+++ b/drivers/gpu/pvr/queue.c
@@ -29,7 +29,11 @@
#include "lists.h"
#include "ttrace.h"
+#if defined(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED)
+#define DC_NUM_COMMANDS_PER_TYPE 2
+#else
#define DC_NUM_COMMANDS_PER_TYPE 1
+#endif
typedef struct _DEVICE_COMMAND_DATA_
{
@@ -138,6 +142,48 @@ void* ProcSeqOff2ElementQueue(struct seq_file * sfile, loff_t off)
#define SYNCOPS_STALE(ui32OpsComplete, ui32OpsPending) \
((ui32OpsComplete) >= (ui32OpsPending))
+#ifdef INLINE_IS_PRAGMA
+#pragma inline(PVRSRVGetWriteOpsPending)
+#endif
+static INLINE
+IMG_UINT32 PVRSRVGetWriteOpsPending(PVRSRV_KERNEL_SYNC_INFO *psSyncInfo, IMG_BOOL bIsReadOp)
+{
+ IMG_UINT32 ui32WriteOpsPending;
+
+ if(bIsReadOp)
+ {
+ ui32WriteOpsPending = psSyncInfo->psSyncData->ui32WriteOpsPending;
+ }
+ else
+ {
+
+
+
+ ui32WriteOpsPending = psSyncInfo->psSyncData->ui32WriteOpsPending++;
+ }
+
+ return ui32WriteOpsPending;
+}
+
+#ifdef INLINE_IS_PRAGMA
+#pragma inline(PVRSRVGetReadOpsPending)
+#endif
+static INLINE
+IMG_UINT32 PVRSRVGetReadOpsPending(PVRSRV_KERNEL_SYNC_INFO *psSyncInfo, IMG_BOOL bIsReadOp)
+{
+ IMG_UINT32 ui32ReadOpsPending;
+
+ if(bIsReadOp)
+ {
+ ui32ReadOpsPending = psSyncInfo->psSyncData->ui32ReadOps2Pending++;
+ }
+ else
+ {
+ ui32ReadOpsPending = psSyncInfo->psSyncData->ui32ReadOps2Pending;
+ }
+
+ return ui32ReadOpsPending;
+}
static IMG_VOID QueueDumpCmdComplete(COMMAND_COMPLETE_DATA *psCmdCompleteData,
IMG_UINT32 i,
@@ -627,7 +673,42 @@ PVRSRV_ERROR IMG_CALLCONV PVRSRVSubmitCommandKM(PVRSRV_QUEUE_INFO *psQueue,
return PVRSRV_OK;
}
+static
+PVRSRV_ERROR CheckIfSyncIsQueued(PVRSRV_SYNC_OBJECT *psSync, COMMAND_COMPLETE_DATA *psCmdData)
+{
+ IMG_UINT32 k;
+
+ if (psCmdData->bInUse)
+ {
+ for (k=0;k<psCmdData->ui32SrcSyncCount;k++)
+ {
+ if (psSync->psKernelSyncInfoKM == psCmdData->psSrcSync[k].psKernelSyncInfoKM)
+ {
+ PVRSRV_SYNC_DATA *psSyncData = psSync->psKernelSyncInfoKM->psSyncData;
+ IMG_UINT32 ui32WriteOpsComplete = psSyncData->ui32WriteOpsComplete;
+
+
+
+ if (ui32WriteOpsComplete == psSync->ui32WriteOpsPending)
+ {
+ return PVRSRV_OK;
+ }
+ else
+ {
+ if (SYNCOPS_STALE(ui32WriteOpsComplete, psSync->ui32WriteOpsPending))
+ {
+ PVR_DPF((PVR_DBG_WARNING,
+ "CheckIfSyncIsQueued: Stale syncops psSyncData:0x%x ui32WriteOpsComplete:0x%x ui32WriteOpsPending:0x%x",
+ (IMG_UINTPTR_T)psSyncData, ui32WriteOpsComplete, psSync->ui32WriteOpsPending));
+ return PVRSRV_OK;
+ }
+ }
+ }
+ }
+ }
+ return PVRSRV_ERROR_FAILED_DEPENDENCIES;
+}
static
PVRSRV_ERROR PVRSRVProcessCommand(SYS_DATA *psSysData,
@@ -694,7 +775,22 @@ PVRSRV_ERROR PVRSRVProcessCommand(SYS_DATA *psSysData,
!SYNCOPS_STALE(ui32WriteOpsComplete, psWalkerObj->ui32WriteOpsPending) ||
!SYNCOPS_STALE(ui32ReadOpsComplete, psWalkerObj->ui32ReadOps2Pending))
{
- return PVRSRV_ERROR_FAILED_DEPENDENCIES;
+ IMG_UINT32 j;
+ PVRSRV_ERROR eError;
+ IMG_BOOL bFound = IMG_FALSE;
+
+ psDeviceCommandData = psSysData->apsDeviceCommandData[psCommand->ui32DevIndex];
+ for (j=0;j<DC_NUM_COMMANDS_PER_TYPE;j++)
+ {
+ eError = CheckIfSyncIsQueued(psWalkerObj, psDeviceCommandData[psCommand->CommandType].apsCmdCompleteData[j]);
+
+ if (eError == PVRSRV_OK)
+ {
+ bFound = IMG_TRUE;
+ }
+ }
+ if (!bFound)
+ return PVRSRV_ERROR_FAILED_DEPENDENCIES;
}
}
psWalkerObj++;
diff --git a/drivers/gpu/pvr/servicesint.h b/drivers/gpu/pvr/servicesint.h
index 352b60f..77c662e 100644
--- a/drivers/gpu/pvr/servicesint.h
+++ b/drivers/gpu/pvr/servicesint.h
@@ -325,49 +325,6 @@ PVRSRV_ERROR FreeMemCallBackCommon(PVRSRV_KERNEL_MEM_INFO *psMemInfo,
PVRSRV_FREE_CALLBACK_ORIGIN eCallbackOrigin);
-#ifdef INLINE_IS_PRAGMA
-#pragma inline(PVRSRVGetWriteOpsPending)
-#endif
-static INLINE
-IMG_UINT32 PVRSRVGetWriteOpsPending(PVRSRV_KERNEL_SYNC_INFO *psSyncInfo, IMG_BOOL bIsReadOp)
-{
- IMG_UINT32 ui32WriteOpsPending;
-
- if(bIsReadOp)
- {
- ui32WriteOpsPending = psSyncInfo->psSyncData->ui32WriteOpsPending;
- }
- else
- {
-
-
-
- ui32WriteOpsPending = psSyncInfo->psSyncData->ui32WriteOpsPending++;
- }
-
- return ui32WriteOpsPending;
-}
-
-#ifdef INLINE_IS_PRAGMA
-#pragma inline(PVRSRVGetReadOpsPending)
-#endif
-static INLINE
-IMG_UINT32 PVRSRVGetReadOpsPending(PVRSRV_KERNEL_SYNC_INFO *psSyncInfo, IMG_BOOL bIsReadOp)
-{
- IMG_UINT32 ui32ReadOpsPending;
-
- if(bIsReadOp)
- {
- ui32ReadOpsPending = psSyncInfo->psSyncData->ui32ReadOps2Pending++;
- }
- else
- {
- ui32ReadOpsPending = psSyncInfo->psSyncData->ui32ReadOps2Pending;
- }
-
- return ui32ReadOpsPending;
-}
-
IMG_IMPORT
PVRSRV_ERROR PVRSRVQueueCommand(IMG_HANDLE hQueueInfo,
PVRSRV_COMMAND *psCommand);