diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-colibri_t30-panel.c')
-rw-r--r-- | arch/arm/mach-tegra/board-colibri_t30-panel.c | 545 |
1 files changed, 150 insertions, 395 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t30-panel.c b/arch/arm/mach-tegra/board-colibri_t30-panel.c index 4f201edeca86..98a728b6662d 100644 --- a/arch/arm/mach-tegra/board-colibri_t30-panel.c +++ b/arch/arm/mach-tegra/board-colibri_t30-panel.c @@ -43,69 +43,20 @@ #include "gpio-names.h" #include "tegra3_host1x_devices.h" -/* common pins( backlight ) for all display boards */ -#define colibri_t30_bl_enb TEGRA_GPIO_PV2 /* BL_ON */ -#define colibri_t30_bl_pwm TEGRA_GPIO_PH0 -#define colibri_t30_hdmi_hpd TEGRA_GPIO_PN7 /* HDMI_INT_N */ +#ifndef COLIBRI_T30_VI +#define colibri_t30_bl_enb TEGRA_GPIO_PV2 /* BL_ON */ +#endif +#define colibri_t30_hdmi_hpd TEGRA_GPIO_PN7 /* HDMI_INT_N */ static struct regulator *colibri_t30_hdmi_reg = NULL; static struct regulator *colibri_t30_hdmi_pll = NULL; static struct regulator *colibri_t30_hdmi_vddio = NULL; -static atomic_t sd_brightness = ATOMIC_INIT(255); - -static struct regulator *colibri_t30_lvds_reg = NULL; -static struct regulator *colibri_t30_lvds_vdd_bl = NULL; -static struct regulator *colibri_t30_lvds_vdd_panel = NULL; - -static tegra_dc_bl_output colibri_t30_bl_output_measured = { - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, - 70, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 133, - 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 148, - 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 179, 180, 181, - 182, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, 255 -}; - -static p_tegra_dc_bl_output bl_output; - +#ifndef COLIBRI_T30_VI static int colibri_t30_backlight_init(struct device *dev) { int ret; - bl_output = colibri_t30_bl_output_measured; - - if (WARN_ON(ARRAY_SIZE(colibri_t30_bl_output_measured) != 256)) - pr_err("bl_output array does not have 256 elements\n"); - - tegra_gpio_disable(colibri_t30_bl_pwm); - - ret = gpio_request(colibri_t30_bl_enb, "backlight_enb"); + ret = gpio_request(colibri_t30_bl_enb, "BL_ON"); if (ret < 0) return ret; @@ -117,35 +68,20 @@ static int colibri_t30_backlight_init(struct device *dev) { }; static void colibri_t30_backlight_exit(struct device *dev) { - /* int ret; */ - /*ret = gpio_request(colibri_t30_bl_enb, "backlight_enb");*/ gpio_set_value(colibri_t30_bl_enb, 0); gpio_free(colibri_t30_bl_enb); - tegra_gpio_disable(colibri_t30_bl_enb); - return; } -static int colibri_t30_backlight_notify(struct device *unused, int brightness) +static int colibri_t30_backlight_notify(struct device *dev, int brightness) { - int cur_sd_brightness = atomic_read(&sd_brightness); + struct platform_pwm_backlight_data *pdata = dev->platform_data; - /* Set the backlight GPIO pin mode to 'backlight_enable' */ - gpio_request(colibri_t30_bl_enb, "backlight_enb"); gpio_set_value(colibri_t30_bl_enb, !!brightness); - /* SD brightness is a percentage, 8-bit value. */ - brightness = (brightness * cur_sd_brightness) / 255; - - /* Apply any backlight response curve */ - if (brightness > 255) { - pr_info("Error: Brightness > 255!\n"); - } else { - brightness = bl_output[brightness]; - /* Full brightness when the output is 0. */ -// brightness = 255 - bl_output[brightness]; - } - - return brightness; + /* unified TFT interface displays (e.g. EDT ET070080DH6) LEDCTRL pin + with inverted behaviour (e.g. 0V brightest vs. 3.3V darkest) */ + if (brightness) return pdata->max_brightness - brightness; + else return brightness; } static int colibri_t30_disp1_check_fb(struct device *dev, struct fb_info *info); @@ -153,8 +89,8 @@ static int colibri_t30_disp1_check_fb(struct device *dev, struct fb_info *info); static struct platform_pwm_backlight_data colibri_t30_backlight_data = { .pwm_id = 0, .max_brightness = 255, - .dft_brightness = 224, - .pwm_period_ns = 1000000, + .dft_brightness = 127, + .pwm_period_ns = 1000000, /* 1 kHz */ .init = colibri_t30_backlight_init, .exit = colibri_t30_backlight_exit, .notify = colibri_t30_backlight_notify, @@ -169,61 +105,15 @@ static struct platform_device colibri_t30_backlight_device = { .platform_data = &colibri_t30_backlight_data, }, }; +#endif /* !COLIBRI_T30_VI */ static int colibri_t30_panel_enable(void) { -#if 0 - if (colibri_t30_lvds_reg == NULL) { - colibri_t30_lvds_reg = regulator_get(NULL, "vdd_lvds"); - if (WARN_ON(IS_ERR(colibri_t30_lvds_reg))) - pr_err("%s: couldn't get regulator vdd_lvds: %ld\n", - __func__, PTR_ERR(colibri_t30_lvds_reg)); - else - regulator_enable(colibri_t30_lvds_reg); - } - - if (colibri_t30_lvds_vdd_bl == NULL) { - colibri_t30_lvds_vdd_bl = regulator_get(NULL, "vdd_backlight"); - if (WARN_ON(IS_ERR(colibri_t30_lvds_vdd_bl))) - pr_err("%s: couldn't get regulator vdd_backlight: %ld\n", - __func__, PTR_ERR(colibri_t30_lvds_vdd_bl)); - else - regulator_enable(colibri_t30_lvds_vdd_bl); - } - - if (colibri_t30_lvds_vdd_panel == NULL) { - colibri_t30_lvds_vdd_panel = regulator_get(NULL, "vdd_lcd_panel"); - if (WARN_ON(IS_ERR(colibri_t30_lvds_vdd_panel))) - pr_err("%s: couldn't get regulator vdd_lcd_panel: %ld\n", - __func__, PTR_ERR(colibri_t30_lvds_vdd_panel)); - else - regulator_enable(colibri_t30_lvds_vdd_panel); - } -#endif - return 0; } static int colibri_t30_panel_disable(void) { - if (colibri_t30_lvds_reg) { - regulator_disable(colibri_t30_lvds_reg); - regulator_put(colibri_t30_lvds_reg); - colibri_t30_lvds_reg = NULL; - } - - if (colibri_t30_lvds_vdd_bl) { - regulator_disable(colibri_t30_lvds_vdd_bl); - regulator_put(colibri_t30_lvds_vdd_bl); - colibri_t30_lvds_vdd_bl = NULL; - } - - if (colibri_t30_lvds_vdd_panel) { - regulator_disable(colibri_t30_lvds_vdd_panel); - regulator_put(colibri_t30_lvds_vdd_panel); - colibri_t30_lvds_vdd_panel= NULL; - } - return 0; } @@ -355,235 +245,160 @@ static struct resource colibri_t30_disp2_resources[] = { #endif static struct tegra_dc_mode colibri_t30_panel_modes[] = { -#if 0 +#ifdef TEGRA_FB_VGA { -//untested - .pclk = 9000000, - .h_ref_to_sync = 2, - .v_ref_to_sync = 2, - .h_sync_width = 41, - .v_sync_width = 10, - .h_back_porch = 2, - .v_back_porch = 2, - .h_active = 480, - .v_active = 272, - .h_front_porch = 2, - .v_front_porch = 2, - }, - { -//working - .pclk = 25175000, + /* 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, - .v_sync_width = 2, - .h_back_porch = 48, - .v_back_porch = 33, + .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, - .v_front_porch = 10, + .h_front_porch = 16, /* right_margin */ + .v_front_porch = 10, /* lower_margin */ }, +#else /* TEGRA_FB_VGA */ { -//works but almost half screen sized rectangle covering left side - .pclk = 27000000, - .h_ref_to_sync = 4, - .v_ref_to_sync = 2, - .h_sync_width = 10, + /* 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 = 20, - .v_back_porch = 3, + .h_back_porch = 128, + .v_back_porch = 22, .h_active = 800, .v_active = 480, - .h_front_porch = 70, - .v_front_porch = 3, + .h_front_porch = 64, + .v_front_porch = 20, }, { -//working - .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, + /* 800x600@60 */ + .pclk = 40000000, + .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, }, { -//working after uping hdmi resolution down below - .pclk = 162000000, - .h_ref_to_sync = 1, - .v_ref_to_sync = 1, - .h_sync_width = 192, + /* 1024x768@60 */ + .pclk = 78800000, + .h_sync_width = 96, .v_sync_width = 3, - .h_back_porch = 304, - .v_back_porch = 46, - .h_active = 1600, - .v_active = 1200, - .h_front_porch = 64, + .h_back_porch = 176, + .v_back_porch = 28, + .h_active = 1024, + .v_active = 768, + .h_front_porch = 16, .v_front_porch = 1, }, { -//shows just black - .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, + /* 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, }, -#endif { -//working with hack - .pclk = 148500000, + /* 1280x720@60 */ + .pclk = 74250000, .h_ref_to_sync = 1, .v_ref_to_sync = 1, - .h_sync_width = 44, + .h_sync_width = 40, .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, + .h_back_porch = 220, + .v_back_porch = 20, + .h_active = 1280, + .v_active = 720, + .h_front_porch = 110, + .v_front_porch = 5, }, -#if 0 { - .pclk = 154000000, -// .h_ref_to_sync = 1, + /* 1366x768@60 */ + .pclk = 72072000, .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 = 25, - .v_back_porch = 26, - .h_active = 1920, - .v_active = 1200, - .h_front_porch = 48, - .v_front_porch = 3, + .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, }, -#endif -}; - -static struct tegra_dc_sd_settings colibri_t30_sd_settings = { - .enable = 1, /* enabled by default. */ - .use_auto_pwm = false, - .hw_update_delay = 0, - .bin_width = -1, - .aggressiveness = 1, - .phase_in_adjustments = true, - .use_vid_luma = false, - /* Default video coefficients */ - .coeff = {5, 9, 2}, - .fc = {0, 0}, - /* Immediate backlight changes */ - .blp = {1024, 255}, - /* Gammas: R: 2.2 G: 2.2 B: 2.2 */ - /* Default BL TF */ - .bltf = { - { - {57, 65, 74, 83}, - {93, 103, 114, 126}, - {138, 151, 165, 179}, - {194, 209, 225, 242}, - }, - { - {58, 66, 75, 84}, - {94, 105, 116, 127}, - {140, 153, 166, 181}, - {196, 211, 227, 244}, - }, - { - {60, 68, 77, 87}, - {97, 107, 119, 130}, - {143, 156, 170, 184}, - {199, 215, 231, 248}, - }, - { - {64, 73, 82, 91}, - {102, 113, 124, 137}, - {149, 163, 177, 192}, - {207, 223, 240, 255}, - }, - }, - /* Default LUT */ - .lut = { - { - {250, 250, 250}, - {194, 194, 194}, - {149, 149, 149}, - {113, 113, 113}, - {82, 82, 82}, - {56, 56, 56}, - {34, 34, 34}, - {15, 15, 15}, - {0, 0, 0}, - }, - { - {246, 246, 246}, - {191, 191, 191}, - {147, 147, 147}, - {111, 111, 111}, - {80, 80, 80}, - {55, 55, 55}, - {33, 33, 33}, - {14, 14, 14}, - {0, 0, 0}, - }, - { - {239, 239, 239}, - {185, 185, 185}, - {142, 142, 142}, - {107, 107, 107}, - {77, 77, 77}, - {52, 52, 52}, - {30, 30, 30}, - {12, 12, 12}, - {0, 0, 0}, - }, - { - {224, 224, 224}, - {173, 173, 173}, - {133, 133, 133}, - {99, 99, 99}, - {70, 70, 70}, - {46, 46, 46}, - {25, 25, 25}, - {7, 7, 7}, - {0, 0, 0}, - }, - }, - .sd_brightness = &sd_brightness, - .bl_device = &colibri_t30_backlight_device, +#endif /* TEGRA_FB_VGA */ }; #ifdef CONFIG_TEGRA_DC static struct tegra_fb_data colibri_t30_fb_data = { .win = 0, - .xres = 1920, - .yres = 1080, -// .bits_per_pixel = 16, +#ifdef TEGRA_FB_VGA + .xres = 640, + .yres = 480, +#else /* TEGRA_FB_VGA */ + .xres = 800, + .yres = 480, +#endif /* TEGRA_FB_VGA */ .bits_per_pixel = 32, .flags = TEGRA_FB_FLIP_ON_PROBE, }; static struct tegra_fb_data colibri_t30_hdmi_fb_data = { .win = 0, - .xres = 1920, - .yres = 1080, + .xres = 640, + .yres = 480, .bits_per_pixel = 32, .flags = TEGRA_FB_FLIP_ON_PROBE, }; +static struct tegra_dc_out_pin colibri_t30_dc_out_pins[] = { + { + .name = TEGRA_DC_OUT_PIN_H_SYNC, + .pol = TEGRA_DC_OUT_PIN_POL_HIGH, + }, + { + .name = TEGRA_DC_OUT_PIN_V_SYNC, + .pol = TEGRA_DC_OUT_PIN_POL_HIGH, + }, + { + .name = TEGRA_DC_OUT_PIN_PIXEL_CLOCK, + .pol = TEGRA_DC_OUT_PIN_POL_LOW, + }, +}; + +static struct tegra_dc_out colibri_t30_disp1_out = { + .type = TEGRA_DC_OUT_RGB, + .parent_clk = "pll_d_out0", + .parent_clk_backup = "pll_d2_out0", + + .align = TEGRA_DC_ALIGN_MSB, + .order = TEGRA_DC_ORDER_RED_BLUE, + .depth = 18, + .dither = TEGRA_DC_ORDERED_DITHER, + + .modes = colibri_t30_panel_modes, + .n_modes = ARRAY_SIZE(colibri_t30_panel_modes), + + .out_pins = colibri_t30_dc_out_pins, + .n_out_pins = ARRAY_SIZE(colibri_t30_dc_out_pins), + + .enable = colibri_t30_panel_enable, + .disable = colibri_t30_panel_disable, +}; + static struct tegra_dc_out colibri_t30_disp2_out = { .type = TEGRA_DC_OUT_HDMI, .flags = TEGRA_DC_OUT_HOTPLUG_HIGH, @@ -604,39 +419,18 @@ static struct tegra_dc_out colibri_t30_disp2_out = { .hotplug_init = colibri_t30_hdmi_vddio_enable, }; -static struct tegra_dc_platform_data colibri_t30_disp2_pdata = { +static struct tegra_dc_platform_data colibri_t30_disp1_pdata = { .flags = TEGRA_DC_FLAG_ENABLED, - .default_out = &colibri_t30_disp2_out, - .fb = &colibri_t30_hdmi_fb_data, + .default_out = &colibri_t30_disp1_out, .emc_clk_rate = 300000000, -}; -#endif - -static struct tegra_dc_out colibri_t30_disp1_out = { - .align = TEGRA_DC_ALIGN_MSB, - .order = TEGRA_DC_ORDER_RED_BLUE, - .sd_settings = &colibri_t30_sd_settings, - .parent_clk = "pll_d_out0", -#if 0 -//init? - .type = TEGRA_DC_OUT_RGB, - .depth = 18, - .dither = TEGRA_DC_ORDERED_DITHER, - - .modes = colibri_t30_panel_modes, - .n_modes = ARRAY_SIZE(colibri_t30_panel_modes), - - .enable = colibri_t30_panel_enable, - .disable = colibri_t30_panel_disable, -#endif + .fb = &colibri_t30_fb_data, }; -#ifdef CONFIG_TEGRA_DC -static struct tegra_dc_platform_data colibri_t30_disp1_pdata = { +static struct tegra_dc_platform_data colibri_t30_disp2_pdata = { .flags = TEGRA_DC_FLAG_ENABLED, - .default_out = &colibri_t30_disp1_out, + .default_out = &colibri_t30_disp2_out, + .fb = &colibri_t30_hdmi_fb_data, .emc_clk_rate = 300000000, -// .fb = &colibri_t30_fb_data, }; static struct nvhost_device colibri_t30_disp1_device = { @@ -663,12 +457,12 @@ static struct nvhost_device colibri_t30_disp2_device = { .platform_data = &colibri_t30_disp2_pdata, }, }; -#else +#else /* CONFIG_TEGRA_DC */ static int colibri_t30_disp1_check_fb(struct device *dev, struct fb_info *info) { return 0; } -#endif +#endif /* CONFIG_TEGRA_DC */ #if defined(CONFIG_TEGRA_NVMAP) static struct nvmap_platform_carveout colibri_t30_carveouts[] = { @@ -694,10 +488,9 @@ static struct platform_device colibri_t30_nvmap_device = { .platform_data = &colibri_t30_nvmap_data, }, }; -#endif +#endif /* CONFIG_TEGRA_NVMAP */ #if defined(CONFIG_ION_TEGRA) - static struct platform_device tegra_iommu_device = { .name = "tegra_iommu_device", .id = -1, @@ -748,7 +541,7 @@ static struct platform_device tegra_ion_device = { .platform_data = &tegra_ion_data, }, }; -#endif +#endif /* CONFIG_ION_TEGRA */ static struct platform_device *colibri_t30_gfx_devices[] __initdata = { #if defined(CONFIG_TEGRA_NVMAP) @@ -757,11 +550,12 @@ static struct platform_device *colibri_t30_gfx_devices[] __initdata = { #if defined(CONFIG_ION_TEGRA) &tegra_ion_device, #endif +#ifndef COLIBRI_T30_VI &tegra_pwfm0_device, &colibri_t30_backlight_device, +#endif /* !COLIBRI_T30_VI */ }; - #ifdef CONFIG_HAS_EARLYSUSPEND /* put early_suspend/late_resume handlers here for the display in order * to keep the code out of the display driver, keeping it closer to upstream @@ -783,63 +577,14 @@ static void colibri_t30_panel_late_resume(struct early_suspend *h) for (i = 0; i < num_registered_fb; i++) fb_blank(registered_fb[i], FB_BLANK_UNBLANK); } -#endif - -static void colibri_t30_panel_preinit(void) -{ - colibri_t30_disp1_out.parent_clk_backup = "pll_d2_out0"; - colibri_t30_disp1_out.type = TEGRA_DC_OUT_RGB; - colibri_t30_disp1_out.depth = 18; - colibri_t30_disp1_out.dither = TEGRA_DC_ORDERED_DITHER; - colibri_t30_disp1_out.modes = colibri_t30_panel_modes; - colibri_t30_disp1_out.n_modes = ARRAY_SIZE(colibri_t30_panel_modes); - colibri_t30_disp1_out.enable = colibri_t30_panel_enable; - colibri_t30_disp1_out.disable = colibri_t30_panel_disable; - - colibri_t30_disp1_pdata.fb = &colibri_t30_fb_data; -} +#endif /* CONFIG_HAS_EARLYSUSPEND */ int __init colibri_t30_panel_init(void) { int err = 0; struct resource *res; -#if defined(CONFIG_TEGRA_NVMAP) - colibri_t30_carveouts[1].base = tegra_carveout_start; - colibri_t30_carveouts[1].size = tegra_carveout_size; -#endif - -#if defined(CONFIG_ION_TEGRA) - tegra_ion_data.heaps[0].base = tegra_carveout_start; - tegra_ion_data.heaps[0].size = tegra_carveout_size; -#endif - - colibri_t30_panel_preinit(); - -#if defined(CONFIG_TEGRA_DC) - /* initialize the values */ -#if defined(PM313_LVDS_PANEL_19X12) - colibri_t30_disp1_out.modes = panel_19X12_modes; - colibri_t30_disp1_out.n_modes = ARRAY_SIZE(panel_19X12_modes); - colibri_t30_disp1_out.parent_clk = "pll_d_out0"; - colibri_t30_disp1_out.depth = 18; -// colibri_t30_disp1_out.depth = 24; - colibri_t30_fb_data.xres = 1920; - colibri_t30_fb_data.yres = 1200; - - colibri_t30_disp2_out.parent_clk = "pll_d2_out0"; - colibri_t30_hdmi_fb_data.xres = 1920; - colibri_t30_hdmi_fb_data.yres = 1200; -#endif - -// err = gpio_request(pm313_lvds_shutdown, "lvds_shutdown"); - /* free ride provided by bootloader */ -// err |= gpio_direction_output(pm313_lvds_shutdown, 1); - - if (err) - printk(KERN_ERR "ERROR(s) in LVDS configuration\n"); -#endif - + /* enable hdmi hotplug gpio for hotplug detection */ gpio_request(colibri_t30_hdmi_hpd, "hdmi_hpd"); gpio_direction_input(colibri_t30_hdmi_hpd); @@ -848,6 +593,16 @@ int __init colibri_t30_panel_init(void) colibri_t30_panel_early_suspender.resume = colibri_t30_panel_late_resume; colibri_t30_panel_early_suspender.level = EARLY_SUSPEND_LEVEL_DISABLE_FB; register_early_suspend(&colibri_t30_panel_early_suspender); +#endif /* CONFIG_HAS_EARLYSUSPEND */ + +#if defined(CONFIG_TEGRA_NVMAP) + colibri_t30_carveouts[1].base = tegra_carveout_start; + colibri_t30_carveouts[1].size = tegra_carveout_size; +#endif + +#if defined(CONFIG_ION_TEGRA) + tegra_ion_data.heaps[0].base = tegra_carveout_start; + tegra_ion_data.heaps[0].size = tegra_carveout_size; #endif #ifdef CONFIG_TEGRA_GRHOST @@ -885,7 +640,7 @@ int __init colibri_t30_panel_init(void) if (!err) err = nvhost_device_register(&colibri_t30_disp2_device); -#endif +#endif /* CONFIG_TEGRA_GRHOST & CONFIG_TEGRA_DC */ #if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_NVAVP) if (!err) |