diff options
author | Andre Sihera <asihera@nvidia.com> | 2011-07-15 20:06:06 +0900 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-07-22 16:33:05 -0700 |
commit | 8cecf2d7fbdf4d00945f3dd13bfe00161d4231d5 (patch) | |
tree | 196d9a64dd991b14af09cbc950692611e3ad9855 | |
parent | 00aa9d18ae1e3c5cb26cc036467e93cfbd04d72a (diff) |
tegra: fb: HDMI monitor spec. not correct via "mode" device.
When monitor is auto-detected on HDMI port, a special structure
is initialised to hold the video mode properties for the plugged-
in monitor. From this the display string is generated for displa
via the "mode" character device under /sys.
When the monitor is disconnected, the structures associated with
the monitor tself are cleared, but the pointer to the video mode
properties structure was left initialised and so pointed into thin
air, which resulted in garbage appearing on the "mode" device.
Added explicit deinitialisation code to reset pointer to video
mode properties so "cat mode" within /sys yields an empty string
when the HDMI monitor is unplugged.
Bug 849877
Change-Id: Idbd3f308ee0ee466f7aba0af9aac7e60af72b7fd
Reviewed-on: http://git-master/r/41205
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
-rw-r--r-- | drivers/video/tegra/fb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index a28ba561477c..1b1952b774b3 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -695,6 +695,12 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info, memset(&fb_info->info->monspecs, 0x0, sizeof(fb_info->info->monspecs)); memset(&mode, 0x0, sizeof(mode)); + + /* + * reset video mode properties to prevent garbage being displayed on 'mode' device. + */ + fb_info->info->mode = (struct fb_videomode*) NULL; + tegra_dc_set_mode(fb_info->win->dc, &mode); mutex_unlock(&fb_info->info->lock); return; |