video: tegra: set output size for hdmi
authorErik Gilling <konkers@android.com>
Fri, 3 Sep 2010 22:30:40 +0000 (15:30 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:28:26 +0000 (16:28 -0700)
Change-Id: I4737963d57e01be62c95076d22a26aaae45bfde1
Signed-off-by: Erik Gilling <konkers@android.com>
arch/arm/mach-tegra/include/mach/dc.h
drivers/video/tegra/dc/hdmi.c

index 7e2e230aad13f786791899d03ebd2de85a43d95a..1a73bae4d2374ce6bb03a762d733390523347c41 100644 (file)
@@ -60,6 +60,10 @@ struct tegra_dc_out {
        int                     type;
        unsigned                flags;
 
+       /* size in mm */
+       unsigned                h_size;
+       unsigned                v_size;
+
        int                     dcc_bus;
        int                     hotplug_gpio;
 
index f10891d50892286a59eb5a164a4f2779591c2410..d5816ba30d396de41f7cc9e6d4c2170ef791ed66 100644 (file)
@@ -365,6 +365,12 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc)
                return false;
        }
 
+       /* monitors like to lie about these but they are still useful for
+        * detecting aspect ratios
+        */
+       dc->out->h_size = specs.max_x * 1000;
+       dc->out->v_size = specs.max_y * 1000;
+
        tegra_fb_update_monspecs(dc->fb, &specs, tegra_dc_hdmi_mode_filter);
        dev_info(&dc->ndev->dev, "display detected\n");
        return true;