summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-07-07 18:59:38 -0700
committerCheryl Jones <chjones@nvidia.com>2011-09-27 17:29:45 -0700
commit3095aed238aec06ce9dc131ddd1b3ff010790523 (patch)
tree5ae31c8fdae82a010623dda86dc8ea4b0f55a2a7
parentcaa11380dc3db31b47e1aef630253498fdccc4e4 (diff)
video: tegra: dc: remove emc clock worker
remove the support to delay changing emc clock. Bug 850852 Reviewed-on: http://git-master/r/40133 (cherry-picked from commit d17e14a17109c80575238695ac6921834d0016a2) Change-Id: I8c482a969ab420f534fcfc9c7ad740d668e0c5a9 Reviewed-on: http://git-master/r/51130 Reviewed-by: Cheryl Jones <chjones@nvidia.com> Tested-by: Cheryl Jones <chjones@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/include/mach/dc.h2
-rw-r--r--drivers/video/tegra/dc/dc.c65
-rw-r--r--drivers/video/tegra/dc/dc_priv.h3
-rw-r--r--drivers/video/tegra/dc/overlay.c6
-rw-r--r--drivers/video/tegra/fb.c8
5 files changed, 0 insertions, 84 deletions
diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h
index 4d5beae07d56..25cf8021215a 100644
--- a/arch/arm/mach-tegra/include/mach/dc.h
+++ b/arch/arm/mach-tegra/include/mach/dc.h
@@ -360,8 +360,6 @@ u32 tegra_dc_get_syncpt_id(const struct tegra_dc *dc);
u32 tegra_dc_incr_syncpt_max(struct tegra_dc *dc);
void tegra_dc_incr_syncpt_min(struct tegra_dc *dc, u32 val);
-int tegra_dc_set_default_emc(struct tegra_dc *dc);
-
/* tegra_dc_update_windows and tegra_dc_sync_windows do not support windows
* with differenct dcs in one call
*/
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 3f6b061ed1a4..d2e99c7c7249 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -51,12 +51,6 @@ static int use_dynamic_emc = 1;
module_param_named(use_dynamic_emc, use_dynamic_emc, int, S_IRUGO | S_IWUSR);
-/* set default windows idle time as 2000ms for power saving purpose */
-static int windows_idle_detection_time = 2000;
-
-module_param_named(windows_idle_detection_time, windows_idle_detection_time,
- int, S_IRUGO | S_IWUSR);
-
struct tegra_dc *tegra_dcs[TEGRA_MAX_DC];
DEFINE_MUTEX(tegra_dc_lock);
@@ -596,25 +590,6 @@ static void tegra_dc_change_emc(struct tegra_dc *dc)
}
}
-static void tegra_dc_reduce_emc_worker(struct work_struct *work)
-{
- struct tegra_dc *dc;
-
- dc = container_of(to_delayed_work(work), struct tegra_dc,
- reduce_emc_clk_work);
-
- mutex_lock(&dc->lock);
-
- if (!dc->enabled) {
- mutex_unlock(&dc->lock);
- return;
- }
-
- tegra_dc_change_emc(dc);
-
- mutex_unlock(&dc->lock);
-}
-
static int tegra_dc_set_dynamic_emc(struct tegra_dc_win *windows[], int n)
{
unsigned long new_rate;
@@ -630,45 +605,6 @@ static int tegra_dc_set_dynamic_emc(struct tegra_dc_win *windows[], int n)
dc->new_emc_clk_rate = new_rate;
- /*
- * If we don't need set EMC immediately after a frame POST, we schedule
- * a work_queue to reduce EMC in the future. This work_queue task will
- * not be executed if the another POST comes before the idle time
- * expired.
- */
- if (NEED_UPDATE_EMC_ON_EVERY_FRAME)
- tegra_dc_change_emc(dc);
- else
- schedule_delayed_work(&dc->reduce_emc_clk_work,
- msecs_to_jiffies(windows_idle_detection_time));
-
- return 0;
-}
-
-int tegra_dc_set_default_emc(struct tegra_dc *dc)
-{
- /*
- * POST happens whenever this function is called, we first delete any
- * reduce_emc_clk_work, then we always set the DC EMC clock to default
- * value.
- */
- cancel_delayed_work_sync(&dc->reduce_emc_clk_work);
-
- if (NEED_UPDATE_EMC_ON_EVERY_FRAME)
- return 0;
-
- mutex_lock(&dc->lock);
-
- if (!dc->enabled) {
- mutex_unlock(&dc->lock);
- return -EFAULT;
- }
-
- dc->new_emc_clk_rate = tegra_dc_get_default_emc_clk_rate(dc);
- tegra_dc_change_emc(dc);
-
- mutex_unlock(&dc->lock);
-
return 0;
}
@@ -1866,7 +1802,6 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
dc->clk = clk;
dc->emc_clk = emc_clk;
- INIT_DELAYED_WORK(&dc->reduce_emc_clk_work, tegra_dc_reduce_emc_worker);
dc->base_res = base_res;
dc->base = base;
diff --git a/drivers/video/tegra/dc/dc_priv.h b/drivers/video/tegra/dc/dc_priv.h
index 450d0ee39ce0..a30179684c84 100644
--- a/drivers/video/tegra/dc/dc_priv.h
+++ b/drivers/video/tegra/dc/dc_priv.h
@@ -30,8 +30,6 @@
#define WIN_USE_V_FILTER(win) ((win)->h != (win)->out_h)
#define WIN_USE_H_FILTER(win) ((win)->w != (win)->out_w)
-#define NEED_UPDATE_EMC_ON_EVERY_FRAME (windows_idle_detection_time == 0)
-
/* DDR: 8 bytes transfer per clock */
#define DDR_BW_TO_FREQ(bw) ((bw) / 8)
@@ -119,7 +117,6 @@ struct tegra_dc {
unsigned long underflow_mask;
struct work_struct reset_work;
- struct delayed_work reduce_emc_clk_work;
struct switch_dev modeset_switch;
};
diff --git a/drivers/video/tegra/dc/overlay.c b/drivers/video/tegra/dc/overlay.c
index 9d46df358643..ae29bba7b024 100644
--- a/drivers/video/tegra/dc/overlay.c
+++ b/drivers/video/tegra/dc/overlay.c
@@ -382,12 +382,6 @@ static int tegra_overlay_flip(struct tegra_overlay_info *overlay,
queue_work(overlay->flip_wq, &data->work);
- /*
- * Before the queued flip_wq get scheduled, we set the EMC clock to the
- * default value in order to do FLIP without glitch.
- */
- tegra_dc_set_default_emc(overlay->dc);
-
args->post_syncpt_val = syncpt_max;
args->post_syncpt_id = tegra_dc_get_syncpt_id(overlay->dc);
mutex_unlock(&tegra_flip_lock);
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index 73ed79193889..1f628d51c5af 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -305,7 +305,6 @@ static int tegra_fb_pan_display(struct fb_var_screeninfo *var,
tegra_fb->win->phys_addr = addr;
/* TODO: update virt_addr */
- tegra_dc_set_default_emc(tegra_fb->win->dc);
tegra_dc_update_windows(&tegra_fb->win, 1);
tegra_dc_sync_windows(&tegra_fb->win, 1);
}
@@ -572,12 +571,6 @@ static int tegra_fb_flip(struct tegra_fb_info *tegra_fb,
queue_work(tegra_fb->flip_wq, &data->work);
- /*
- * Before the queued flip_wq get scheduled, we set the EMC clock to the
- * default value in order to do FLIP without glitch.
- */
- tegra_dc_set_default_emc(tegra_fb->win->dc);
-
args->post_syncpt_val = syncpt_max;
args->post_syncpt_id = tegra_dc_get_syncpt_id(tegra_fb->win->dc);
@@ -877,7 +870,6 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
dev_info(&ndev->dev, "probed\n");
if (fb_data->flags & TEGRA_FB_FLIP_ON_PROBE) {
- tegra_dc_set_default_emc(tegra_fb->win->dc);
tegra_dc_update_windows(&tegra_fb->win, 1);
tegra_dc_sync_windows(&tegra_fb->win, 1);
}