summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-apalis_t30-panel.c268
-rw-r--r--arch/arm/mach-tegra/board-apalis_t30.h3
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20-panel.c270
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20.h3
-rw-r--r--arch/arm/mach-tegra/board-colibri_t30-panel.c278
-rw-r--r--arch/arm/mach-tegra/board-colibri_t30.h3
-rw-r--r--arch/arm/mach-tegra/include/mach/dc.h9
7 files changed, 36 insertions, 798 deletions
diff --git a/arch/arm/mach-tegra/board-apalis_t30-panel.c b/arch/arm/mach-tegra/board-apalis_t30-panel.c
index cb76ca99c083..1be339dce6ef 100644
--- a/arch/arm/mach-tegra/board-apalis_t30-panel.c
+++ b/arch/arm/mach-tegra/board-apalis_t30-panel.c
@@ -211,278 +211,15 @@ static struct resource apalis_t30_disp2_resources[] = {
};
#endif /* CONFIG_TEGRA_DC */
-static struct tegra_dc_mode apalis_t30_panel_modes[] = {
-#ifdef TEGRA_FB_VGA
- {
- /* 640x480p 60hz: EIA/CEA-861-B Format 1 */
- .pclk = 25175000, /* pixclock */
- .h_ref_to_sync = 8,
- .v_ref_to_sync = 2,
- .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,
- .v_active = 480,
- .h_front_porch = 16, /* right_margin */
- .v_front_porch = 10, /* lower_margin */
- },
- {
- /* 800x480@60 (e.g. EDT ET070080DH6) */
- .pclk = 32460000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 64,
- .v_sync_width = 3,
- .h_back_porch = 128,
- .v_back_porch = 22,
- .h_active = 800,
- .v_active = 480,
- .h_front_porch = 64,
- .v_front_porch = 20,
- },
- {
- /* 800x600@60 */
- .pclk = 39272727,
- .h_sync_width = 80,
- .v_sync_width = 2,
- .h_back_porch = 160,
- .v_back_porch = 21,
- .h_active = 800,
- .v_active = 600,
- .h_front_porch = 16,
- .v_front_porch = 1,
- },
- {
- /* TouchRevolution Fusion 10 aka Chunghwa Picture Tubes
- CLAA101NC05 10.1 inch 1024x600 single channel LVDS panel */
- .pclk = 48000000,
- .h_sync_width = 5,
- .v_sync_width = 5,
- .h_back_porch = 104,
- .v_back_porch = 24,
- .h_active = 1024,
- .v_active = 600,
- .h_front_porch = 43,
- .v_front_porch = 20,
- },
- {
- /* 1024x768@60 */
- .pclk = 78800000,
- .h_sync_width = 96,
- .v_sync_width = 3,
- .h_back_porch = 176,
- .v_back_porch = 28,
- .h_active = 1024,
- .v_active = 768,
- .h_front_porch = 16,
- .v_front_porch = 1,
- },
- {
- /* 1024x768@75 */
- .pclk = 82000000,
- .h_sync_width = 104,
- .v_sync_width = 4,
- .h_back_porch = 168,
- .v_back_porch = 34,
- .h_active = 1024,
- .v_active = 768,
- .h_front_porch = 64,
- .v_front_porch = 3,
- },
- {
- /* 1280x720@60 */
- .pclk = 74250000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 40,
- .v_sync_width = 5,
- .h_back_porch = 220,
- .v_back_porch = 20,
- .h_active = 1280,
- .v_active = 720,
- .h_front_porch = 110,
- .v_front_porch = 5,
-//high active sync polarities
- },
- {
- /* 1280x1024@60 */
- .pclk = 108000000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 144,
- .v_sync_width = 3,
- .h_back_porch = 248,
- .v_back_porch = 38,
- .h_active = 1280,
- .v_active = 1024,
- .h_front_porch = 16,
- .v_front_porch = 1,
-//high active sync polarities
- },
- {
- /* 1366x768@60 */
- .pclk = 72072000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 58,
- .v_sync_width = 4,
- .h_back_porch = 58,
- .v_back_porch = 4,
- .h_active = 1366,
- .v_active = 768,
- .h_front_porch = 58,
- .v_front_porch = 4,
- },
- {
- /* 1600x1200@60 */
- .pclk = 162000000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 192,
- .v_sync_width = 3,
- .h_back_porch = 304,
- .v_back_porch = 46,
- .h_active = 1600,
- .v_active = 1200,
- .h_front_porch = 64,
- .v_front_porch = 1,
-//high active sync polarities
- },
- {
- .pclk = 119000000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 32,
- .v_sync_width = 6,
- .h_back_porch = 80,
- .v_back_porch = 21,
- .h_active = 1680,
- .v_active = 1050,
- .h_front_porch = 48,
- .v_front_porch = 3,
- },
- {
- /* 1680x1050@60 */
- .pclk = 147140000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 184,
- .v_sync_width = 3,
- .h_back_porch = 288,
- .v_back_porch = 33,
- .h_active = 1680,
- .v_active = 1050,
- .h_front_porch = 104,
- .v_front_porch = 1,
-//high active vertical sync polarity
- },
-#else /* TEGRA_FB_VGA */
- {
- /* LG LP156WF1 15.6 inch full HD dual channel LVDS panel */
- .pclk = 138500000,
- .h_sync_width = 32,
- .v_sync_width = 5,
- .h_back_porch = 80,
- .v_back_porch = 46,
- .h_active = 1920,
- .v_active = 1080,
- .h_front_porch = 48,
- .v_front_porch = 6,
- //low active sync polarities, high pixel clock polarity
- },
- {
- /* 1920x1080p 59.94/60hz EIA/CEA-861-B Format 16 */
- .pclk = 148500000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 44,
- .v_sync_width = 5,
- .h_back_porch = 148,
- .v_back_porch = 36,
- .h_active = 1920,
- .v_active = 1080,
- .h_front_porch = 88,
- .v_front_porch = 4,
-//high active sync polarities
- },
- {
- .pclk = 154000000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 32,
- .v_sync_width = 6,
- .h_back_porch = 80,
- .v_back_porch = 26,
- .h_active = 1920,
- .v_active = 1200,
- .h_front_porch = 48,
- .v_front_porch = 3,
- },
-
- /* portrait modes */
-
- {
- .pclk = 18000000,
- .h_ref_to_sync = 8,
- .v_ref_to_sync = 2,
- .h_sync_width = 4,
- .v_sync_width = 1,
- .h_back_porch = 20,
- .v_back_porch = 7,
- .h_active = 480,
- .v_active = 640,
- .h_front_porch = 8,
- .v_front_porch = 8,
- },
- {
- .pclk = 10000000,
- .h_ref_to_sync = 4,
- .v_ref_to_sync = 1,
- .h_sync_width = 16,
- .v_sync_width = 1,
- .h_back_porch = 32,
- .v_back_porch = 1,
- .h_active = 540,
- .v_active = 960,
- .h_front_porch = 32,
- .v_front_porch = 2,
- },
- {
- .pclk = 61417000,
- .h_ref_to_sync = 2,
- .v_ref_to_sync = 2,
- .h_sync_width = 4,
- .v_sync_width = 4,
- .h_back_porch = 100,
- .v_back_porch = 14,
- .h_active = 720,
- .v_active = 1280,
- .h_front_porch = 4,
- .v_front_porch = 4,
- },
-#endif /* TEGRA_FB_VGA */
-};
#ifdef CONFIG_TEGRA_DC
static struct tegra_fb_data apalis_t30_fb_data = {
.win = 0,
-#ifdef TEGRA_FB_VGA
- .xres = 640,
- .yres = 480,
-#else /* TEGRA_FB_VGA */
- .xres = 1920,
- .yres = 1080,
-#endif /* TEGRA_FB_VGA */
- .bits_per_pixel = 16,
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
static struct tegra_fb_data apalis_t30_hdmi_fb_data = {
.win = 0,
- .xres = 640,
- .yres = 480,
- .bits_per_pixel = 16,
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
@@ -511,8 +248,7 @@ static struct tegra_dc_out apalis_t30_disp1_out = {
.depth = 24,
.dither = TEGRA_DC_ORDERED_DITHER,
- .modes = apalis_t30_panel_modes,
- .n_modes = ARRAY_SIZE(apalis_t30_panel_modes),
+ .default_mode = "640x480-16@60",
.out_pins = apalis_t30_dc_out_pins,
.n_out_pins = ARRAY_SIZE(apalis_t30_dc_out_pins),
@@ -531,6 +267,8 @@ static struct tegra_dc_out apalis_t30_disp2_out = {
.max_pixclock = KHZ2PICOS(148500),
+ .default_mode = "640x480-16@60",
+
.align = TEGRA_DC_ALIGN_MSB,
.order = TEGRA_DC_ORDER_RED_BLUE,
diff --git a/arch/arm/mach-tegra/board-apalis_t30.h b/arch/arm/mach-tegra/board-apalis_t30.h
index 8c11647b8319..9fde9ef1d89e 100644
--- a/arch/arm/mach-tegra/board-apalis_t30.h
+++ b/arch/arm/mach-tegra/board-apalis_t30.h
@@ -26,9 +26,6 @@
#include <mach/gpio.h>
#include <mach/irqs.h>
-/* Run framebuffer in VGA mode */
-//#define TEGRA_FB_VGA
-
/* GPIO */
#define APALIS_GPIO1 TEGRA_GPIO_PS2
diff --git a/arch/arm/mach-tegra/board-colibri_t20-panel.c b/arch/arm/mach-tegra/board-colibri_t20-panel.c
index 6c6ff73eb318..c4746590d209 100644
--- a/arch/arm/mach-tegra/board-colibri_t20-panel.c
+++ b/arch/arm/mach-tegra/board-colibri_t20-panel.c
@@ -208,268 +208,13 @@ static struct resource colibri_t20_disp2_resources[] = {
},
};
-static struct tegra_dc_mode colibri_t20_panel_modes[] = {
-#ifdef TEGRA_FB_VGA
- {
- /* 640x480p 60hz: EIA/CEA-861-B Format 1 */
- .pclk = 25175000, /* pixclock */
- .h_ref_to_sync = 8,
- .v_ref_to_sync = 2,
- .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,
- .v_active = 480,
- .h_front_porch = 16, /* right_margin */
- .v_front_porch = 10, /* lower_margin */
- },
-#else /* TEGRA_FB_VGA */
- {
- /* 800x480@60 (e.g. EDT ET070080DH6) */
- .pclk = 32460000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 64,
- .v_sync_width = 3,
- .h_back_porch = 128,
- .v_back_porch = 22,
- .h_active = 800,
- .v_active = 480,
- .h_front_porch = 64,
- .v_front_porch = 20,
- },
- {
- /* 800x600@60 */
- .pclk = 39272727,
- .h_sync_width = 80,
- .v_sync_width = 2,
- .h_back_porch = 160,
- .v_back_porch = 21,
- .h_active = 800,
- .v_active = 600,
- .h_front_porch = 16,
- .v_front_porch = 1,
- },
- {
- /* TouchRevolution Fusion 10 aka Chunghwa Picture Tubes
- CLAA101NC05 10.1 inch 1024x600 single channel LVDS panel */
- .pclk = 48000000,
- .h_sync_width = 5,
- .v_sync_width = 5,
- .h_back_porch = 104,
- .v_back_porch = 24,
- .h_active = 1024,
- .v_active = 600,
- .h_front_porch = 43,
- .v_front_porch = 20,
- },
- {
- /* 1024x768@60 */
-//pll_c 76Hz
- .pclk = 78800000,
- .h_sync_width = 96,
- .v_sync_width = 3,
- .h_back_porch = 176,
- .v_back_porch = 28,
- .h_active = 1024,
- .v_active = 768,
- .h_front_porch = 16,
- .v_front_porch = 1,
- },
- {
- /* 1024x768@75 */
- .pclk = 82000000,
- .h_sync_width = 104,
- .v_sync_width = 4,
- .h_back_porch = 168,
- .v_back_porch = 34,
- .h_active = 1024,
- .v_active = 768,
- .h_front_porch = 64,
- .v_front_porch = 3,
- },
- {
- /* 1280x720@70 */
- .pclk = 86400000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 40,
- .v_sync_width = 5,
- .h_back_porch = 220,
- .v_back_porch = 20,
- .h_active = 1280,
- .v_active = 720,
- .h_front_porch = 110,
- .v_front_porch = 5,
-//high active sync polarities
- },
- {
- /* 1280x1024@60 */
- .pclk = 108000000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 144,
- .v_sync_width = 3,
- .h_back_porch = 248,
- .v_back_porch = 38,
- .h_active = 1280,
- .v_active = 1024,
- .h_front_porch = 16,
- .v_front_porch = 1,
-//high active sync polarities
- },
- {
- /* 1366x768@60 */
- .pclk = 72072000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 58,
- .v_sync_width = 4,
- .h_back_porch = 58,
- .v_back_porch = 4,
- .h_active = 1366,
- .v_active = 768,
- .h_front_porch = 58,
- .v_front_porch = 4,
- },
- {
- /* 1600x1200@60 */
- .pclk = 144000000,
-//[ 1.423072] tegradc tegradc.0: can't divide 216000000 clock to 162000000 -1/+9% 144000000 160380000 176580000
-// .pclk = 162000000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 192,
- .v_sync_width = 3,
- .h_back_porch = 304,
- .v_back_porch = 46,
- .h_active = 1600,
- .v_active = 1200,
- .h_front_porch = 64,
- .v_front_porch = 1,
-//high active sync polarities
- },
- {
- /* 1680x1050@60 */
- .pclk = 144000000,
-//[ 1.423139] tegradc tegradc.0: can't divide 216000000 clock to 147140000 -1/+9% 144000000 145668600 160382600
-// .pclk = 147140000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 184,
- .v_sync_width = 3,
- .h_back_porch = 288,
- .v_back_porch = 33,
- .h_active = 1680,
- .v_active = 1050,
- .h_front_porch = 104,
- .v_front_porch = 1,
-//high active vertical sync polarity
- },
- {
- /* 1920x1080p 59.94/60hz EIA/CEA-861-B Format 16 */
- .pclk = 144000000,
-//[ 3.361002] tegradc tegradc.0: can't divide 216000000 clock to 148500000 -1/+9% 144000000 147015000 161865000
-// .pclk = 148500000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 44,
- .v_sync_width = 5,
- .h_back_porch = 148,
- .v_back_porch = 36,
- .h_active = 1920,
- .v_active = 1080,
- .h_front_porch = 88,
- .v_front_porch = 4,
-//high active sync polarities
- },
- {
- .pclk = 144000000,
-//[ 3.371657] tegradc tegradc.0: can't divide 216000000 clock to 154000000 -1/+9% 144000000 152460000 167860000
-// .pclk = 154000000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 32,
- .v_sync_width = 6,
- .h_back_porch = 80,
- .v_back_porch = 26,
- .h_active = 1920,
- .v_active = 1200,
- .h_front_porch = 48,
- .v_front_porch = 3,
- },
-
- /* portrait modes */
-
- {
- .pclk = 18000000,
- .h_ref_to_sync = 8,
- .v_ref_to_sync = 2,
- .h_sync_width = 4,
- .v_sync_width = 1,
- .h_back_porch = 20,
- .v_back_porch = 7,
- .h_active = 480,
- .v_active = 640,
- .h_front_porch = 8,
- .v_front_porch = 8,
- },
- {
- .pclk = 10000000,
- .h_ref_to_sync = 4,
- .v_ref_to_sync = 1,
- .h_sync_width = 16,
- .v_sync_width = 1,
- .h_back_porch = 32,
- .v_back_porch = 1,
- .h_active = 540,
- .v_active = 960,
- .h_front_porch = 32,
- .v_front_porch = 2,
- },
- {
- .pclk = 61417000,
- .h_ref_to_sync = 2,
- .v_ref_to_sync = 2,
- .h_sync_width = 4,
- .v_sync_width = 4,
- .h_back_porch = 100,
- .v_back_porch = 14,
- .h_active = 720,
- .v_active = 1280,
- .h_front_porch = 4,
- .v_front_porch = 4,
- },
-#endif /* TEGRA_FB_VGA */
-};
-
static struct tegra_fb_data colibri_t20_fb_data = {
.win = 0,
-#ifdef TEGRA_FB_VGA
- .xres = 640,
- .yres = 480,
-#else /* TEGRA_FB_VGA */
- .xres = 800,
- .yres = 480,
-#endif /* TEGRA_FB_VGA */
-#ifndef CONFIG_ANDROID
- .bits_per_pixel = 16,
-#else
- .bits_per_pixel = 32,
-#endif
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
static struct tegra_fb_data colibri_t20_hdmi_fb_data = {
.win = 0,
- .xres = 640,
- .yres = 480,
-#ifndef CONFIG_ANDROID
- .bits_per_pixel = 16,
-#else
- .bits_per_pixel = 32,
-#endif
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
@@ -499,8 +244,12 @@ static struct tegra_dc_out colibri_t20_disp1_out = {
.depth = 18,
.dither = TEGRA_DC_ORDERED_DITHER,
- .modes = colibri_t20_panel_modes,
- .n_modes = ARRAY_SIZE(colibri_t20_panel_modes),
+ /* Use 32-bit depth for android builds */
+#ifdef CONFIG_ANDROID
+ .default_mode = "640x480-32@60",
+#else /* CONFIG_ANDROID */
+ .default_mode = "640x480-16@60",
+#endif /* CONFIG_ANDROID */
.out_pins = colibri_t20_dc_out_pins,
.n_out_pins = ARRAY_SIZE(colibri_t20_dc_out_pins),
@@ -518,6 +267,13 @@ static struct tegra_dc_out colibri_t20_disp2_out = {
.max_pixclock = KHZ2PICOS(148500),
+ /* Use 32-bit depth for android builds */
+#ifdef CONFIG_ANDROID
+ .default_mode = "640x480-32@60",
+#else /* CONFIG_ANDROID */
+ .default_mode = "640x480-16@60",
+#endif /* CONFIG_ANDROID */
+
.align = TEGRA_DC_ALIGN_MSB,
.order = TEGRA_DC_ORDER_RED_BLUE,
diff --git a/arch/arm/mach-tegra/board-colibri_t20.h b/arch/arm/mach-tegra/board-colibri_t20.h
index c7f2c5dcad33..23e9cdbda749 100644
--- a/arch/arm/mach-tegra/board-colibri_t20.h
+++ b/arch/arm/mach-tegra/board-colibri_t20.h
@@ -23,9 +23,6 @@
#define COLIBRI_T20_VI
#endif
-/* Run framebuffer in VGA mode */
-#define TEGRA_FB_VGA
-
/* Uncomment to activate 32-bit GMI address/databus */
//#define GMI_32BIT
diff --git a/arch/arm/mach-tegra/board-colibri_t30-panel.c b/arch/arm/mach-tegra/board-colibri_t30-panel.c
index bbbbbe3dddd3..14c711039f41 100644
--- a/arch/arm/mach-tegra/board-colibri_t30-panel.c
+++ b/arch/arm/mach-tegra/board-colibri_t30-panel.c
@@ -213,277 +213,14 @@ static struct resource colibri_t30_disp2_resources[] = {
.flags = IORESOURCE_MEM,
},
};
-#endif /* CONFIG_TEGRA_DC */
-static struct tegra_dc_mode colibri_t30_panel_modes[] = {
-#ifdef TEGRA_FB_VGA
- {
- /* 640x480p 60hz: EIA/CEA-861-B Format 1 */
- .pclk = 25175000, /* pixclock */
- .h_ref_to_sync = 8,
- .v_ref_to_sync = 2,
- .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,
- .v_active = 480,
- .h_front_porch = 16, /* right_margin */
- .v_front_porch = 10, /* lower_margin */
- },
-#else /* TEGRA_FB_VGA */
- {
- /* 800x480@60 (e.g. EDT ET070080DH6) */
- .pclk = 32460000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 64,
- .v_sync_width = 3,
- .h_back_porch = 128,
- .v_back_porch = 22,
- .h_active = 800,
- .v_active = 480,
- .h_front_porch = 64,
- .v_front_porch = 20,
- },
- {
- /* 800x600@60 */
- .pclk = 39272727,
- .h_sync_width = 80,
- .v_sync_width = 2,
- .h_back_porch = 160,
- .v_back_porch = 21,
- .h_active = 800,
- .v_active = 600,
- .h_front_porch = 16,
- .v_front_porch = 1,
- },
- {
- /* TouchRevolution Fusion 10 aka Chunghwa Picture Tubes
- CLAA101NC05 10.1 inch 1024x600 single channel LVDS panel */
- .pclk = 48000000,
- .h_sync_width = 5,
- .v_sync_width = 5,
- .h_back_porch = 104,
- .v_back_porch = 24,
- .h_active = 1024,
- .v_active = 600,
- .h_front_porch = 43,
- .v_front_porch = 20,
- },
- {
- /* 1024x768@60 */
- .pclk = 78800000,
- .h_sync_width = 96,
- .v_sync_width = 3,
- .h_back_porch = 176,
- .v_back_porch = 28,
- .h_active = 1024,
- .v_active = 768,
- .h_front_porch = 16,
- .v_front_porch = 1,
- },
- {
- /* 1024x768@75 */
- .pclk = 82000000,
- .h_sync_width = 104,
- .v_sync_width = 4,
- .h_back_porch = 168,
- .v_back_porch = 34,
- .h_active = 1024,
- .v_active = 768,
- .h_front_porch = 64,
- .v_front_porch = 3,
- },
- {
- /* 1280x720@60 */
- .pclk = 74250000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 40,
- .v_sync_width = 5,
- .h_back_porch = 220,
- .v_back_porch = 20,
- .h_active = 1280,
- .v_active = 720,
- .h_front_porch = 110,
- .v_front_porch = 5,
-//high active sync polarities
- },
- {
- /* 1280x1024@60 */
- .pclk = 108000000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 144,
- .v_sync_width = 3,
- .h_back_porch = 248,
- .v_back_porch = 38,
- .h_active = 1280,
- .v_active = 1024,
- .h_front_porch = 16,
- .v_front_porch = 1,
-//high active sync polarities
- },
- {
- /* 1366x768@60 */
- .pclk = 72072000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 58,
- .v_sync_width = 4,
- .h_back_porch = 58,
- .v_back_porch = 4,
- .h_active = 1366,
- .v_active = 768,
- .h_front_porch = 58,
- .v_front_porch = 4,
- },
- {
- /* 1600x1200@60 */
- .pclk = 162000000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 192,
- .v_sync_width = 3,
- .h_back_porch = 304,
- .v_back_porch = 46,
- .h_active = 1600,
- .v_active = 1200,
- .h_front_porch = 64,
- .v_front_porch = 1,
-//high active sync polarities
- },
- {
- .pclk = 119000000,
- .h_ref_to_sync = 1,
- .v_ref_to_sync = 1,
- .h_sync_width = 32,
- .v_sync_width = 6,
- .h_back_porch = 80,
- .v_back_porch = 21,
- .h_active = 1680,
- .v_active = 1050,
- .h_front_porch = 48,
- .v_front_porch = 3,
- },
- {
- /* 1680x1050@60 */
- .pclk = 147140000,
-// .h_ref_to_sync = 1,
-// .v_ref_to_sync = 1,
- .h_sync_width = 184,
- .v_sync_width = 3,
- .h_back_porch = 288,
- .v_back_porch = 33,
- .h_active = 1680,
- .v_active = 1050,
- .h_front_porch = 104,
- .v_front_porch = 1,
-//high active vertical sync polarity
- },
- {
- /* 1920x1080p 59.94/60hz EIA/CEA-861-B Format 16 */
- .pclk = 148500000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 44,
- .v_sync_width = 5,
- .h_back_porch = 148,
- .v_back_porch = 36,
- .h_active = 1920,
- .v_active = 1080,
- .h_front_porch = 88,
- .v_front_porch = 4,
-//high active sync polarities
- },
- {
- .pclk = 154000000,
- .h_ref_to_sync = 11,
- .v_ref_to_sync = 1,
- .h_sync_width = 32,
- .v_sync_width = 6,
- .h_back_porch = 80,
- .v_back_porch = 26,
- .h_active = 1920,
- .v_active = 1200,
- .h_front_porch = 48,
- .v_front_porch = 3,
- },
-
- /* portrait modes */
-
- {
- .pclk = 18000000,
- .h_ref_to_sync = 8,
- .v_ref_to_sync = 2,
- .h_sync_width = 4,
- .v_sync_width = 1,
- .h_back_porch = 20,
- .v_back_porch = 7,
- .h_active = 480,
- .v_active = 640,
- .h_front_porch = 8,
- .v_front_porch = 8,
- },
- {
- .pclk = 10000000,
- .h_ref_to_sync = 4,
- .v_ref_to_sync = 1,
- .h_sync_width = 16,
- .v_sync_width = 1,
- .h_back_porch = 32,
- .v_back_porch = 1,
- .h_active = 540,
- .v_active = 960,
- .h_front_porch = 32,
- .v_front_porch = 2,
- },
- {
- .pclk = 61417000,
- .h_ref_to_sync = 2,
- .v_ref_to_sync = 2,
- .h_sync_width = 4,
- .v_sync_width = 4,
- .h_back_porch = 100,
- .v_back_porch = 14,
- .h_active = 720,
- .v_active = 1280,
- .h_front_porch = 4,
- .v_front_porch = 4,
- },
-#endif /* TEGRA_FB_VGA */
-};
-
-#ifdef CONFIG_TEGRA_DC
static struct tegra_fb_data colibri_t30_fb_data = {
.win = 0,
-#ifdef TEGRA_FB_VGA
- .xres = 640,
- .yres = 480,
-#else /* TEGRA_FB_VGA */
- .xres = 800,
- .yres = 480,
-#endif /* TEGRA_FB_VGA */
-#ifndef CONFIG_ANDROID
- .bits_per_pixel = 16,
-#else
- .bits_per_pixel = 32,
-#endif
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
static struct tegra_fb_data colibri_t30_hdmi_fb_data = {
.win = 0,
-#ifndef CONFIG_ANDROID
- .xres = 640,
- .yres = 480,
- .bits_per_pixel = 16,
-#else /* CONFIG_ANDROID */
- .xres = 1920,
- .yres = 1080,
- .bits_per_pixel = 32,
-#endif /* !CONFIG_ANDROID */
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
@@ -512,8 +249,12 @@ static struct tegra_dc_out colibri_t30_disp1_out = {
.depth = 18,
.dither = TEGRA_DC_ORDERED_DITHER,
- .modes = colibri_t30_panel_modes,
- .n_modes = ARRAY_SIZE(colibri_t30_panel_modes),
+ /* Use 32-bit depth for android builds */
+#ifdef CONFIG_ANDROID
+ .default_mode = "640x480-32@60",
+#else /* CONFIG_ANDROID */
+ .default_mode = "640x480-16@60",
+#endif /* CONFIG_ANDROID */
.out_pins = colibri_t30_dc_out_pins,
.n_out_pins = ARRAY_SIZE(colibri_t30_dc_out_pins),
@@ -532,6 +273,13 @@ static struct tegra_dc_out colibri_t30_disp2_out = {
.max_pixclock = KHZ2PICOS(148500),
+ /* Use 32-bit depth and Full HD for android builds */
+#ifdef CONFIG_ANDROID
+ .default_mode = "1920x1080-32@60",
+#else /* CONFIG_ANDROID */
+ .default_mode = "640x480-16@60",
+#endif /* CONFIG_ANDROID */
+
.align = TEGRA_DC_ALIGN_MSB,
.order = TEGRA_DC_ORDER_RED_BLUE,
diff --git a/arch/arm/mach-tegra/board-colibri_t30.h b/arch/arm/mach-tegra/board-colibri_t30.h
index 21de318173ea..85563fe222ba 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.h
+++ b/arch/arm/mach-tegra/board-colibri_t30.h
@@ -32,9 +32,6 @@
#define COLIBRI_T30_VI
#endif
-/* Run framebuffer in VGA mode */
-#define TEGRA_FB_VGA
-
/* GPIO */
#define DDC_SCL TEGRA_GPIO_PV4 /* X2-15 */
diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h
index d22a58f22a60..13dc8c0be03a 100644
--- a/arch/arm/mach-tegra/include/mach/dc.h
+++ b/arch/arm/mach-tegra/include/mach/dc.h
@@ -353,6 +353,8 @@ struct tegra_dc_out {
unsigned depth;
unsigned dither;
+ const char *default_mode;
+
struct tegra_dc_mode *modes;
int n_modes;
@@ -550,6 +552,8 @@ bool tegra_dc_is_within_n_vsync(struct tegra_dc *dc, s64 ts);
bool tegra_dc_does_vsync_separate(struct tegra_dc *dc, s64 new_ts, s64 old_ts);
#endif /* !CONFIG_ANDROID */
+int tegra_dc_var_to_dc_mode(struct tegra_dc *dc, struct fb_var_screeninfo *var,
+ struct tegra_dc_mode *mode);
int tegra_dc_set_mode(struct tegra_dc *dc, const struct tegra_dc_mode *mode);
struct fb_videomode;
int tegra_dc_set_fb_mode(struct tegra_dc *dc, const struct fb_videomode *fbmode,
@@ -594,8 +598,9 @@ struct tegra_dc_edid {
struct tegra_dc_edid *tegra_dc_get_edid(struct tegra_dc *dc);
void tegra_dc_put_edid(struct tegra_dc_edid *edid);
-int tegra_dc_set_flip_callback(void (*callback)(void));
+int tegra_dc_set_flip_callback(int (*callback)(void));
int tegra_dc_unset_flip_callback(void);
int tegra_dc_get_panel_sync_rate(void);
-
+int tegra_fb_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
+ const char* option, unsigned int default_bpp);
#endif