video: add support for 1080p stereo
Dhiren Bhatia [Fri, 12 Aug 2011 00:41:56 +0000 (17:41 -0700)]
Original-Change-Id: I933f64a82b74025f3ea05a2a20a24cba7948b039
Reviewed-on: http://git-master/r/46995
Reviewed-by: Alok Ahuja <alahuja@nvidia.com>
Tested-by: Dhiren Bhatia <dbhatia@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>

Rebase-Id: R3b58044e1c821040ffba6adee54fb4b7131dd489

drivers/video/tegra/dc/edid.c
drivers/video/tegra/dc/hdmi.c

index c2d9991..055cea3 100644 (file)
@@ -289,10 +289,12 @@ int tegra_edid_mode_support_stereo(struct fb_videomode *mode)
        if (!mode)
                return 0;
 
-       if (mode->xres == 1280 && mode->yres == 720 && mode->refresh == 60)
+       if (mode->xres == 1280 &&
+               mode->yres == 720 &&
+               ((mode->refresh == 60) || (mode->refresh == 50)))
                return 1;
 
-       if (mode->xres == 1280 && mode->yres == 720 && mode->refresh == 50)
+       if (mode->xres == 1920 && mode->yres == 1080 && mode->refresh == 24)
                return 1;
 
        return 0;
index 20d9ec8..4672ca1 100644 (file)
@@ -166,6 +166,23 @@ const struct fb_videomode tegra_dc_hdmi_supported_modes[] = {
                .vmode =        FB_VMODE_NONINTERLACED,
                .sync = 0,
        },
+
+       /* 1920x1080p 23.98/24hz: EIA/CEA-861-B Format 32 (Stereo)*/
+       {
+               .xres =         1920,
+               .yres =         1080,
+               .pixclock =     KHZ2PICOS(74250),
+               .hsync_len =    44,     /* h_sync_width */
+               .vsync_len =    5,      /* v_sync_width */
+               .left_margin =  148,    /* h_back_porch */
+               .upper_margin = 36,     /* v_back_porch */
+               .right_margin = 638,    /* h_front_porch */
+               .lower_margin = 4,      /* v_front_porch */
+               .vmode = FB_VMODE_NONINTERLACED |
+                                FB_VMODE_STEREO_FRAME_PACK,
+               .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+       },
+
        /* 1920x1080p 30Hz EIA/CEA-861-B Format 34 */
        {
                .xres =         1920,
@@ -1304,7 +1321,9 @@ static void tegra_dc_hdmi_setup_avi_infoframe(struct tegra_dc *dc, bool dvi)
                        avi.vic = 4; /* 60 Hz */
                else
                        avi.vic = 19; /* 50 Hz */
-       } else if (dc->mode.v_active == 1080) {
+       } else if (dc->mode.v_active == 1080 ||
+               (dc->mode.v_active == 2205 && dc->mode.stereo_mode)) {
+               /* VIC for both 1080p and 1080p 3D mode */
                avi.m = HDMI_AVI_M_16_9;
                if (dc->mode.h_front_porch == 88)
                        avi.vic = 16; /* 60 Hz */