video: tegra: flush fb_flip workqueue on blank and suspend

Change-Id: I58e9ba73b2fd232e6c1f40946e2e353b90ce5dd7
Signed-off-by: Erik Gilling <konkers@android.com>
This commit is contained in:
Erik Gilling
2010-11-08 15:08:40 -08:00
parent f1ec3093e5
commit 961428a649
3 changed files with 15 additions and 1 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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)
{