summaryrefslogtreecommitdiff
path: root/drivers/video/tegra
diff options
context:
space:
mode:
authorAndre Sihera <asihera@nvidia.com>2011-07-15 20:06:06 +0900
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-15 11:48:59 +0530
commit6212a204e86486daf1c870f207d41c32c79b06a9 (patch)
treed447234cddf0da9633b1ee7ae430ac980dbc839c /drivers/video/tegra
parent30b149f340fc0ccece0733052d33a77ae1bf2d09 (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 Reviewed-on: http://git-master/r/41205 (cherry picked from commit 8cecf2d7fbdf4d00945f3dd13bfe00161d4231d5) Change-Id: Ibf3f070fa7904e8a01966d2886bbe07e9b69a607 Reviewed-on: http://git-master/r/68588 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
Diffstat (limited to 'drivers/video/tegra')
-rw-r--r--drivers/video/tegra/fb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index 43de292172d2..e3fec88966f7 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -331,6 +331,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;