diff options
author | Erik Gilling <konkers@android.com> | 2010-10-19 14:49:05 -0700 |
---|---|---|
committer | Erik Gilling <konkers@android.com> | 2010-10-20 18:21:34 -0700 |
commit | d7962c6bae3a0d6d9017a72588e7d0ecefd3555f (patch) | |
tree | 4f2c6723bdeabb87e7c5261084566c192c90ec71 /drivers/video/tegra/fb.c | |
parent | 99bf62514fed837810e332cd356a4b9f92eb3ebc (diff) |
video: tegra: allow clearing of video modes in fb driver
Change-Id: Ibec4fd2ef7136843b68c52b60862b2c5c3e795fc
Signed-off-by: Erik Gilling <konkers@android.com>
Diffstat (limited to 'drivers/video/tegra/fb.c')
-rw-r--r-- | drivers/video/tegra/fb.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index 6d826d03aef9..ef4e4c3e3708 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -553,11 +553,21 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info, mutex_lock(&fb_info->info->lock); fb_destroy_modedb(fb_info->info->monspecs.modedb); + fb_destroy_modelist(&fb_info->info->modelist); + + if (specs == NULL) { + struct tegra_dc_mode mode; + memset(&fb_info->info->monspecs, 0x0, + sizeof(fb_info->info->monspecs)); + memset(&mode, 0x0, sizeof(mode)); + tegra_dc_set_mode(fb_info->win->dc, &mode); + mutex_unlock(&fb_info->info->lock); + return; + } + memcpy(&fb_info->info->monspecs, specs, sizeof(fb_info->info->monspecs)); - fb_destroy_modelist(&fb_info->info->modelist); - for (i = 0; i < specs->modedb_len; i++) { if (mode_filter) { if (mode_filter(&specs->modedb[i])) |