summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2010-11-08 15:08:40 -0800
committerErik Gilling <konkers@android.com>2010-11-09 13:54:41 -0800
commit961428a649899d0e83f76f27526b26a196d8dc2e (patch)
tree9d6f8353982442dd29246eaa166e8041d79b03e0
parentf1ec3093e5ef4f60878214b820150b2c13cd7b27 (diff)
video: tegra: flush fb_flip workqueue on blank and suspend
Change-Id: I58e9ba73b2fd232e6c1f40946e2e353b90ce5dd7 Signed-off-by: Erik Gilling <konkers@android.com>
-rw-r--r--arch/arm/mach-tegra/include/mach/fb.h5
-rw-r--r--drivers/video/tegra/dc/dc.c4
-rw-r--r--drivers/video/tegra/fb.c7
3 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/include/mach/fb.h b/arch/arm/mach-tegra/include/mach/fb.h
index 0c9577208a2c..deac25a27ea9 100644
--- a/arch/arm/mach-tegra/include/mach/fb.h
+++ b/arch/arm/mach-tegra/include/mach/fb.h
@@ -37,6 +37,8 @@ void tegra_fb_unregister(struct tegra_fb_info *fb_info);
void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
struct fb_monspecs *specs,
bool (*mode_filter)(struct fb_videomode *mode));
+/* called by display controller on suspend */
+void tegra_fb_suspend(struct tegra_fb_info *tegra_fb);
#else
static inline struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
struct tegra_dc *dc,
@@ -55,6 +57,9 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
bool (*mode_filter)(struct fb_videomode *mode))
{
}
+void tegra_fb_suspend(struct tegra_fb_info *tegra_fb)
+{
+}
#endif
#endif
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index db90860b731d..d802535b913b 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1102,8 +1102,10 @@ static int tegra_dc_suspend(struct nvhost_device *ndev, pm_message_t state)
dev_info(&ndev->dev, "suspend\n");
mutex_lock(&dc->lock);
- if (dc->enabled)
+ if (dc->enabled) {
+ tegra_fb_suspend(dc->fb);
_tegra_dc_disable(dc);
+ }
mutex_unlock(&dc->lock);
return 0;
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index 6992e1c06ddf..2a42ae56d71b 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -216,6 +216,7 @@ static int tegra_fb_blank(int blank, struct fb_info *info)
case FB_BLANK_POWERDOWN:
dev_dbg(&tegra_fb->ndev->dev, "blank\n");
+ flush_workqueue(tegra_fb->flip_wq);
tegra_dc_disable(tegra_fb->win->dc);
return 0;
@@ -224,6 +225,12 @@ static int tegra_fb_blank(int blank, struct fb_info *info)
}
}
+void tegra_fb_suspend(struct tegra_fb_info *tegra_fb)
+{
+ flush_workqueue(tegra_fb->flip_wq);
+}
+
+
static int tegra_fb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{