summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorWen Yi <wyi@nvidia.com>2012-08-21 17:04:48 -0700
committerMrutyunjay Sawant <msawant@nvidia.com>2012-09-17 06:33:20 -0700
commit4c12e7369dcd7789ff2477279e28a792dca2eac7 (patch)
tree76ee4363f677feee46de6a68af62a477f38df884 /arch
parent441a643006ba7368494a13a44223ef85cc041c78 (diff)
arm: tegra: raise cpu floor when display is on
When device is idle and display is on, the minimal cpu frequency can drop to 51mhz. Since it takes several tens of millisecond to ramp up cpu freq, the delay impact negatively the performance of low latency CPU bound tasks. Given the power savings of several milliwatts running cpu at 51mhz comparing to 102mhz or 204 mhz at idle, the idle cpu freq is hence raised to 102mhz for smart panel device and 204mhz for dump panel devices. Bug 1036216 Change-Id: Ifb0ed88d4c5fcf5b637d09c587322cec72b8a08d Signed-off-by: Wen Yi <wyi@nvidia.com> (cherry picked from commit c8465feffcd0cf2401bbd6c6f535955dd68bda55) Reviewed-on: http://git-master/r/132479 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ujjaval Patel <upatel@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-power.c2
-rw-r--r--arch/arm/mach-tegra/board-enterprise-power.c1
-rw-r--r--arch/arm/mach-tegra/pm.c9
-rw-r--r--arch/arm/mach-tegra/pm.h11
4 files changed, 20 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c
index e76cbc458914..677b38347514 100644
--- a/arch/arm/mach-tegra/board-cardhu-power.c
+++ b/arch/arm/mach-tegra/board-cardhu-power.c
@@ -1191,6 +1191,8 @@ int __init cardhu_suspend_init(void)
cardhu_suspend_data.lp1_core_volt_high = 0x50;
}
#endif
+ if (is_display_board_dsi(display_board_info.board_id))
+ cardhu_suspend_data.cpu_wake_freq = CPU_WAKE_FREQ_LOW;
case BOARD_PM305:
case BOARD_PM311:
break;
diff --git a/arch/arm/mach-tegra/board-enterprise-power.c b/arch/arm/mach-tegra/board-enterprise-power.c
index c154841eba93..3475452adc5a 100644
--- a/arch/arm/mach-tegra/board-enterprise-power.c
+++ b/arch/arm/mach-tegra/board-enterprise-power.c
@@ -822,6 +822,7 @@ static struct tegra_suspend_platform_data enterprise_suspend_data = {
.lp1_core_volt_low = 0x1D,
.lp1_core_volt_high = 0x33,
#endif
+ .cpu_wake_freq = CPU_WAKE_FREQ_LOW,
};
static void enterprise_init_deep_sleep_mode(void)
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index b20b51245d50..88dd501689af 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -178,7 +178,6 @@ struct suspend_context tegra_sctx;
#define MC_SECURITY_SIZE 0x70
#define MC_SECURITY_CFG2 0x7c
-#define AWAKE_CPU_FREQ_MIN 51000
static struct pm_qos_request_list awake_cpu_freq_req;
struct dvfs_rail *tegra_cpu_rail;
@@ -1105,13 +1104,17 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
u32 reg;
u32 mode;
+ if (plat->cpu_wake_freq == 0)
+ plat->cpu_wake_freq = CPU_WAKE_FREQ_HIGH;
+
tegra_cpu_rail = tegra_dvfs_get_rail_by_name("vdd_cpu");
tegra_core_rail = tegra_dvfs_get_rail_by_name("vdd_core");
pm_qos_add_request(&awake_cpu_freq_req, PM_QOS_CPU_FREQ_MIN,
- AWAKE_CPU_FREQ_MIN);
+ plat->cpu_wake_freq);
tegra_pclk = clk_get_sys(NULL, "pclk");
BUG_ON(IS_ERR(tegra_pclk));
+
pdata = plat;
(void)reg;
(void)mode;
@@ -1383,7 +1386,7 @@ static void pm_late_resume(struct early_suspend *h)
{
if (clk_wake)
clk_enable(clk_wake);
- pm_qos_update_request(&awake_cpu_freq_req, (s32)AWAKE_CPU_FREQ_MIN);
+ pm_qos_update_request(&awake_cpu_freq_req, (s32)pdata->cpu_wake_freq);
}
static struct early_suspend pm_early_suspender = {
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index 5ea2b7f843a2..401c0aaf061f 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -33,6 +33,16 @@
#define PMC_SCRATCH1 0x54
#define PMC_SCRATCH4 0x60
+/* The following two constants are for setting the CPU freq
+ * floor when display is on. 204000Khz is for tablet and
+ * 102000KHz is for phones. The reason for different values
+ * for tablet and phone is due to phones usually have smart
+ * displays that requires less CPU activity for refreshing
+ * the screen
+ */
+
+#define CPU_WAKE_FREQ_HIGH 204000
+#define CPU_WAKE_FREQ_LOW 102000
enum tegra_suspend_mode {
TEGRA_SUSPEND_NONE = 0,
TEGRA_SUSPEND_LP2, /* CPU voltage off */
@@ -73,6 +83,7 @@ struct tegra_suspend_platform_data {
unsigned int lp1_core_volt_low;
unsigned int lp1_core_volt_high;
#endif
+ int cpu_wake_freq;
};
/* clears io dpd settings before kernel code */