Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix low performance issues for vdd2_opp below 3

  • Loading branch information...
commit b53f3491233d44fe4689cc430f993c84bad2089b 1 parent 200283d
@SkrilaxCZ SkrilaxCZ authored committed
Showing with 22 additions and 0 deletions.
  1. +22 −0 services4/system/omap3/sysutils_linux.c
View
22 services4/system/omap3/sysutils_linux.c
@@ -40,6 +40,8 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <plat/resource.h>
+#include <plat/omap-pm.h>
#define ONE_MHZ 1000000
#define HZ_TO_MHZ(m) ((m) / ONE_MHZ)
@@ -165,6 +167,24 @@ PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData)
#endif
SysEnableSGXInterrupts(psSysData);
+ if (cpu_is_omap3430())
+ {
+ /* pin the memory bus bw to the highest value */
+ omap_pm_set_min_bus_tput(&gpsPVRLDMDev->dev,
+ OCP_INITIATOR_AGENT, 400000);
+ }
+ else if (cpu_is_omap3630())
+ {
+ /* pin the memory bus bw to the highest value */
+ omap_pm_set_min_bus_tput(&gpsPVRLDMDev->dev,
+ OCP_INITIATOR_AGENT, 800000);
+ }
+ else
+ {
+ PVR_DPF((PVR_DBG_ERROR, "ForceMaxSGXClocks: \
+ Invalid OMAP Chip ID"));
+ return PVRSRV_ERROR_UNABLE_TO_ENABLE_CLOCK;
+ }
atomic_set(&psSysSpecData->sSGXClocksEnabled, 1);
@@ -187,6 +207,8 @@ IMG_VOID DisableSGXClocks(SYS_DATA *psSysData)
PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks"));
+ omap_pm_set_min_bus_tput(&gpsPVRLDMDev->dev, OCP_INITIATOR_AGENT, 0);
+
SysDisableSGXInterrupts(psSysData);
#if defined(LDM_PLATFORM) && !defined(PVR_DRI_DRM_NOT_PCI)
Please sign in to comment.
Something went wrong with that request. Please try again.