Patchwork [2/7] gpu: pvr: Update to DDK 1.8@2198402

login
register
mail settings
Submitter Ricardo Salveti de Araujo
Date July 19, 2013, 6:42 p.m.
Message ID <1374259379-31107-3-git-send-email-ricardo.salveti@canonical.com>
Download mbox | patch
Permalink /patch/260320/
State New
Headers show

Comments

Ricardo Salveti de Araujo - July 19, 2013, 6:42 p.m.
From: Alistair Strachan <alistair.strachan@imgtec.com>

 - Implemented a DC API change which queues a dummy display flip to
   workaround a rare and difficult to reproduce synchronization
   deadlock.
 - Eliminate log spam from Linux shrinker integration.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>

 7 files changed, 34 insertions(+), 19 deletions(-)

Patch

diff --git a/drivers/gpu/pvr/Makefile b/drivers/gpu/pvr/Makefile
index 6a45523..183d76d 100644
--- a/drivers/gpu/pvr/Makefile
+++ b/drivers/gpu/pvr/Makefile
@@ -36,7 +36,7 @@  ccflags-$(CONFIG_PVR_BUILD_RELEASE) += \
 ccflags-$(CONFIG_PVR_BUILD_DEBUG) += \
 	-DPVR_BUILD_TYPE="\"debug\"" -DDEBUG
 
-ccflags-$(CONFIG_PVR_NEED_PVR_DPF) += -DPVRSRV_NEED_PVR_DPF -DPVRSRV_NEED_PVR_TRACE
+ccflags-$(CONFIG_PVR_NEED_PVR_DPF) += -DPVRSRV_NEED_PVR_DPF
 ccflags-$(CONFIG_PVR_NEED_PVR_ASSERT) += -DPVRSRV_NEED_PVR_ASSERT
 
 ccflags-$(CONFIG_PVR_DEBUG_MEMORY) += \
diff --git a/drivers/gpu/pvr/kerneldisplay.h b/drivers/gpu/pvr/kerneldisplay.h
index 55111d3..23384d7 100644
--- a/drivers/gpu/pvr/kerneldisplay.h
+++ b/drivers/gpu/pvr/kerneldisplay.h
@@ -191,7 +191,7 @@  typedef struct DISPLAYCLASS_FLIP_COMMAND2_TAG
 
 #define DC_STATE_NO_FLUSH_COMMANDS		0
 #define DC_STATE_FLUSH_COMMANDS			1
-
+#define DC_STATE_FORCE_SWAP_TO_SYSTEM	2
 
 typedef IMG_BOOL (*PFN_DC_GET_PVRJTABLE)(PPVRSRV_DC_DISP2SRV_KMJTABLE);
 
diff --git a/drivers/gpu/pvr/mm.c b/drivers/gpu/pvr/mm.c
index 5053a45..ecad206 100644
--- a/drivers/gpu/pvr/mm.c
+++ b/drivers/gpu/pvr/mm.c
@@ -56,9 +56,11 @@ 
 #include <linux/highmem.h>
 #include <linux/sched.h>
 
+#if defined(PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK)
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
 #include <linux/shrinker.h>
 #endif
+#endif
 
 #include "img_defs.h"
 #include "services.h"
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index d5df63f7..a70b454 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -150,6 +150,9 @@  static IMG_VOID SetDCState(IMG_HANDLE hDevice, IMG_UINT32 ui32State)
 		case DC_STATE_NO_FLUSH_COMMANDS:
 			OMAPLFBAtomicBoolSet(&psDevInfo->sFlushCommands, OMAPLFB_FALSE);
 			break;
+		case DC_STATE_FORCE_SWAP_TO_SYSTEM:
+			OMAPLFBFlip(psDevInfo, &psDevInfo->sSystemBuffer);
+			break;
 		default:
 			break;
 	}
diff --git a/drivers/gpu/pvr/pvrsrv.c b/drivers/gpu/pvr/pvrsrv.c
index 1b730f5..af2b6eb 100644
--- a/drivers/gpu/pvr/pvrsrv.c
+++ b/drivers/gpu/pvr/pvrsrv.c
@@ -840,7 +840,9 @@  PVRSRV_ERROR IMG_CALLCONV PVRSRVGetMiscInfoKM(PVRSRV_MISC_INFO *psMiscInfo)
 										|PVRSRV_MISC_INFO_CPUCACHEOP_PRESENT
 										|PVRSRV_MISC_INFO_RESET_PRESENT
 										|PVRSRV_MISC_INFO_FREEMEM_PRESENT
-										|PVRSRV_MISC_INFO_GET_REF_COUNT_PRESENT))
+										|PVRSRV_MISC_INFO_GET_REF_COUNT_PRESENT
+										|PVRSRV_MISC_INFO_GET_PAGE_SIZE_PRESENT
+										|PVRSRV_MISC_INFO_FORCE_SWAP_TO_SYSTEM_PRESENT))
 	{
 		PVR_DPF((PVR_DBG_ERROR,"PVRSRVGetMiscInfoKM: invalid state request flags"));
 		return PVRSRV_ERROR_INVALID_PARAMS;
@@ -1094,6 +1096,12 @@  PVRSRV_ERROR IMG_CALLCONV PVRSRVGetMiscInfoKM(PVRSRV_MISC_INFO *psMiscInfo)
 	}
 #endif 
 
+	if ((psMiscInfo->ui32StateRequest & PVRSRV_MISC_INFO_FORCE_SWAP_TO_SYSTEM_PRESENT) != 0UL)
+	{
+		PVRSRVSetDCState(DC_STATE_FORCE_SWAP_TO_SYSTEM);
+		psMiscInfo->ui32StatePresent |= PVRSRV_MISC_INFO_FORCE_SWAP_TO_SYSTEM_PRESENT;
+	}
+
 	return PVRSRV_OK;
 }
 
diff --git a/drivers/gpu/pvr/pvrversion.h b/drivers/gpu/pvr/pvrversion.h
index 28a2f45..99a55f5 100644
--- a/drivers/gpu/pvr/pvrversion.h
+++ b/drivers/gpu/pvr/pvrversion.h
@@ -35,17 +35,17 @@ 
 #define PVRVERSION_BRANCH            18
 
 #define PVRVERSION_FAMILY           "sgxddk"
-#define PVRVERSION_BRANCHNAME       "1.8"
-#define PVRVERSION_BUILD             905891
+#define PVRVERSION_BRANCHNAME       "1.8.GOOGLENEXUS.ED945322"
+#define PVRVERSION_BUILD             2198402
 #define PVRVERSION_BSCONTROL        "CustomerGoogle_Android_ogles1_ogles2_GPL"
 
-#define PVRVERSION_STRING           "CustomerGoogle_Android_ogles1_ogles2_GPL sgxddk 18 1.8@" PVR_STR2(PVRVERSION_BUILD)
-#define PVRVERSION_STRING_SHORT     "1.8@" PVR_STR2(PVRVERSION_BUILD)
+#define PVRVERSION_STRING           "CustomerGoogle_Android_ogles1_ogles2_GPL sgxddk 18 1.8.GOOGLENEXUS.ED945322@" PVR_STR2(PVRVERSION_BUILD)
+#define PVRVERSION_STRING_SHORT     "1.8.GOOGLENEXUS.ED945322@" PVR_STR2(PVRVERSION_BUILD)
 
 #define COPYRIGHT_TXT               "Copyright (c) Imagination Technologies Ltd. All Rights Reserved."
 
-#define PVRVERSION_BUILD_HI          90
-#define PVRVERSION_BUILD_LO          5891
+#define PVRVERSION_BUILD_HI          219
+#define PVRVERSION_BUILD_LO          8402
 #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/services.h b/drivers/gpu/pvr/services.h
index 1619aef..1f34059 100644
--- a/drivers/gpu/pvr/services.h
+++ b/drivers/gpu/pvr/services.h
@@ -92,16 +92,18 @@  extern "C" {
 #define PVRSRV_DEFAULT_DEV_COOKIE			(1)	 
 
 
-#define PVRSRV_MISC_INFO_TIMER_PRESENT				(1U<<0)
-#define PVRSRV_MISC_INFO_CLOCKGATE_PRESENT			(1U<<1)
-#define PVRSRV_MISC_INFO_MEMSTATS_PRESENT			(1U<<2)
-#define PVRSRV_MISC_INFO_GLOBALEVENTOBJECT_PRESENT	(1U<<3)
-#define PVRSRV_MISC_INFO_DDKVERSION_PRESENT			(1U<<4)
-#define PVRSRV_MISC_INFO_CPUCACHEOP_PRESENT			(1U<<5)
-#define PVRSRV_MISC_INFO_FREEMEM_PRESENT			(1U<<6)
-#define PVRSRV_MISC_INFO_GET_REF_COUNT_PRESENT		(1U<<7)
-
-#define PVRSRV_MISC_INFO_RESET_PRESENT				(1U<<31)
+#define PVRSRV_MISC_INFO_TIMER_PRESENT					(1U<<0)
+#define PVRSRV_MISC_INFO_CLOCKGATE_PRESENT				(1U<<1)
+#define PVRSRV_MISC_INFO_MEMSTATS_PRESENT				(1U<<2)
+#define PVRSRV_MISC_INFO_GLOBALEVENTOBJECT_PRESENT		(1U<<3)
+#define PVRSRV_MISC_INFO_DDKVERSION_PRESENT				(1U<<4)
+#define PVRSRV_MISC_INFO_CPUCACHEOP_PRESENT				(1U<<5)
+#define PVRSRV_MISC_INFO_FREEMEM_PRESENT				(1U<<6)
+#define PVRSRV_MISC_INFO_GET_REF_COUNT_PRESENT			(1U<<7)
+#define PVRSRV_MISC_INFO_GET_PAGE_SIZE_PRESENT			(1U<<8)
+#define PVRSRV_MISC_INFO_FORCE_SWAP_TO_SYSTEM_PRESENT	(1U<<9)
+
+#define PVRSRV_MISC_INFO_RESET_PRESENT					(1U<<31)
 
 #define PVRSRV_PDUMP_MAX_FILENAME_SIZE			20
 #define PVRSRV_PDUMP_MAX_COMMENT_SIZE			200