summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHaluk Aral <h-aral@ti.com>2011-05-31 09:25:04 +0100
committerAndy Green <andy.green@linaro.org>2011-05-31 11:06:33 +0100
commit93a949f24bd80f859eff932f503549d514f03644 (patch)
treef6280b9f370a1c5842cff9f66a11dd0bf3e7c5ba /drivers
parent2d6412f6d68e20ab784e50dfdf33fc3506636e78 (diff)
SGX:KM DVFS Implementation
DVFS Implementation for SGX driver Change-Id: Ic85b2cd8c91c289984fff4ab804eb565506dd9cf Signed-off-by: Haluk Aral <h-aral@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/pvr/omap4/sysconfig.h2
-rw-r--r--drivers/gpu/pvr/omap4/sysutils_linux_wqueue_compat.c16
2 files changed, 14 insertions, 4 deletions
diff --git a/drivers/gpu/pvr/omap4/sysconfig.h b/drivers/gpu/pvr/omap4/sysconfig.h
index 7fcf84b2e8d..bf789072847 100644
--- a/drivers/gpu/pvr/omap4/sysconfig.h
+++ b/drivers/gpu/pvr/omap4/sysconfig.h
@@ -42,7 +42,7 @@
#define SYS_SGX_CLOCK_SPEED 304742400
#endif
#if defined(CONFIG_SGX_REV120)
-#define SYS_SGX_CLOCK_SPEED 320000000
+#define SYS_SGX_CLOCK_SPEED 307200000
#endif
#endif
#endif
diff --git a/drivers/gpu/pvr/omap4/sysutils_linux_wqueue_compat.c b/drivers/gpu/pvr/omap4/sysutils_linux_wqueue_compat.c
index d44a39c6939..5aa875d6895 100644
--- a/drivers/gpu/pvr/omap4/sysutils_linux_wqueue_compat.c
+++ b/drivers/gpu/pvr/omap4/sysutils_linux_wqueue_compat.c
@@ -33,6 +33,7 @@
#include <plat/gpu.h>
#include <plat/omap-pm.h>
#include <linux/pm_runtime.h>
+#include <plat/omap_device.h>
#include "sgxdefs.h"
#include "services_headers.h"
#include "sysinfo.h"
@@ -52,6 +53,13 @@
extern LDM_DEV *gpsPVRLDMDev;
extern struct gpu_platform_data *gpsSgxPlatformData;
+
+#if !defined(NO_HARDWARE)
+
+static struct pm_qos_request_list *qos_request;
+
+#endif
+
PVRSRV_ERROR SysPowerLockWrap(SYS_DATA unref__ *psSysData)
{
return PVRSRV_OK;
@@ -122,11 +130,12 @@ PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData)
{
return PVRSRV_OK;
}
-
PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks"));
pm_runtime_get_sync(&gpsPVRLDMDev->dev);
-
+ gpsSgxPlatformData->set_max_mpu_wakeup_lat(&qos_request, 0);
+ omap_device_set_rate(&gpsPVRLDMDev->dev,
+ &gpsPVRLDMDev->dev, SYS_SGX_CLOCK_SPEED);
atomic_set(&psSysSpecData->sSGXClocksEnabled, 1);
#else
@@ -150,7 +159,8 @@ IMG_VOID DisableSGXClocks(SYS_DATA *psSysData)
PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks"));
pm_runtime_put_sync(&gpsPVRLDMDev->dev);
-
+ gpsSgxPlatformData->set_max_mpu_wakeup_lat(&qos_request, -1);
+ omap_device_set_rate(&gpsPVRLDMDev->dev, &gpsPVRLDMDev->dev, 0);
atomic_set(&psSysSpecData->sSGXClocksEnabled, 0);
#else