arm: tegra: ardbeg: add default hdmi panel mode
Jong Kim [Mon, 21 Oct 2013 19:02:09 +0000 (12:02 -0700)]
Add default 640x480 hdmi panel mode. This HDMI mode is just a dummy
for device probe to pass and finish dc/fb/fbcon registration. The
actual mode will be detected by detect worker and programmed to the
hw a little later during boot process.

bug 1264520
bug 1320357
bug 1324935

Change-Id: Ibd1cbe98b2f21e1c0bed8226b4876c473279c239
Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/301956
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

arch/arm/mach-tegra/board-ardbeg-panel.c

index 7c5a237..d96f15a 100644 (file)
@@ -305,6 +305,24 @@ struct tegra_hdmi_out ardbeg_hdmi_out = {
 };
 
 
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE
+static struct tegra_dc_mode hdmi_panel_modes[] = {
+       {
+               .pclk =                 KHZ2PICOS(25200),
+               .h_ref_to_sync =        1,
+               .v_ref_to_sync =        1,
+               .h_sync_width =         96,     /* hsync_len */
+               .v_sync_width =         2,      /* vsync_len */
+               .h_back_porch =         48,     /* left_margin */
+               .v_back_porch =         33,     /* upper_margin */
+               .h_active =             640,    /* xres */
+               .v_active =             480,    /* yres */
+               .h_front_porch =        16,     /* right_margin */
+               .v_front_porch =        10,     /* lower_margin */
+       },
+};
+#endif /* CONFIG_FRAMEBUFFER_CONSOLE */
+
 static struct tegra_dc_out ardbeg_disp2_out = {
        .type           = TEGRA_DC_OUT_HDMI,
        .flags          = TEGRA_DC_OUT_HOTPLUG_HIGH,
@@ -316,6 +334,11 @@ static struct tegra_dc_out ardbeg_disp2_out = {
 
        /* TODO: update max pclk to POR */
        .max_pixclock   = KHZ2PICOS(297000),
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE
+       .modes = hdmi_panel_modes,
+       .n_modes = ARRAY_SIZE(hdmi_panel_modes),
+       .depth = 24,
+#endif /* CONFIG_FRAMEBUFFER_CONSOLE */
 
        .align          = TEGRA_DC_ALIGN_MSB,
        .order          = TEGRA_DC_ORDER_RED_BLUE,