summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Hariyani <hemanthariyani@ti.com>2011-05-31 09:25:15 +0100
committerAndy Green <andy.green@linaro.org>2011-05-31 11:06:48 +0100
commit33e9ca458389571aa6034f6150062fc1236494cd (patch)
tree820d3486cfa6bf8896b7b41570a2fda733116198
parent3bd0715c687b3f86a142d8fb6e535811ed52085d (diff)
OMAP4: SGX-KM: Fix VCore3 scaling issue
SGX driver was holding its clocks at 307 MHz and this would prevent scaling OPP down. This patch fixes this and sets SGX clock speed to 307 and 0 during Active Power Management transitions. Change-Id: I034927b9b94125ef388ab7d6e8bcc7e2615573b0 Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
-rw-r--r--drivers/gpu/pvr/omap4/sysconfig.c9
-rw-r--r--drivers/gpu/pvr/omap4/sysutils_linux.c10
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/pvr/omap4/sysconfig.c b/drivers/gpu/pvr/omap4/sysconfig.c
index 5c82be77d46..0851c48736d 100644
--- a/drivers/gpu/pvr/omap4/sysconfig.c
+++ b/drivers/gpu/pvr/omap4/sysconfig.c
@@ -34,10 +34,6 @@
#include "ocpdefs.h"
-#if defined(LDM_PLATFORM) && !defined(PVR_DRI_DRM_NOT_PCI)
-#include <plat/omap_device.h>
-#endif
-
SYS_DATA* gpsSysData = (SYS_DATA*)IMG_NULL;
SYS_DATA gsSysData;
@@ -427,11 +423,6 @@ PVRSRV_ERROR SysInitialise(IMG_VOID)
psDeviceNode = psDeviceNode->psNext;
}
-#if defined(LDM_PLATFORM) && !defined(PVR_DRI_DRM_NOT_PCI)
- omap_device_set_rate(&gpsPVRLDMDev->dev,
- &gpsPVRLDMDev->dev, SYS_SGX_CLOCK_SPEED);
-#endif
-
eError = EnableSystemClocksWrap(gpsSysData);
if (eError != PVRSRV_OK)
{
diff --git a/drivers/gpu/pvr/omap4/sysutils_linux.c b/drivers/gpu/pvr/omap4/sysutils_linux.c
index f7c3ac11424..508020adb6a 100644
--- a/drivers/gpu/pvr/omap4/sysutils_linux.c
+++ b/drivers/gpu/pvr/omap4/sysutils_linux.c
@@ -41,6 +41,11 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#if defined(LDM_PLATFORM) && !defined(PVR_DRI_DRM_NOT_PCI)
+#include <plat/omap_device.h>
+#endif
+
+
#define ONE_MHZ 1000000
#define HZ_TO_MHZ(m) ((m) / ONE_MHZ)
@@ -153,6 +158,9 @@ PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData)
PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks"));
#if defined(LDM_PLATFORM) && !defined(PVR_DRI_DRM_NOT_PCI)
+ omap_device_set_rate(&gpsPVRLDMDev->dev,
+ &gpsPVRLDMDev->dev, SYS_SGX_CLOCK_SPEED);
+
{
int res = pm_runtime_get_sync(&gpsPVRLDMDev->dev);
@@ -198,6 +206,8 @@ IMG_VOID DisableSGXClocks(SYS_DATA *psSysData)
PVR_DPF((PVR_DBG_ERROR, "DisableSGXClocks: pm_runtime_put_sync failed (%d)", -res));
}
}
+ omap_device_set_rate(&gpsPVRLDMDev->dev,
+ &gpsPVRLDMDev->dev, 0);
#endif