diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-panel.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c index 6fa33f919dad..d7101af55712 100644 --- a/arch/arm/mach-tegra/board-cardhu-panel.c +++ b/arch/arm/mach-tegra/board-cardhu-panel.c @@ -678,7 +678,11 @@ static struct tegra_fb_data cardhu_fb_data = { .win = 0, .xres = 1366, .yres = 768, +#ifdef CONFIG_TEGRA_DC_USE_HW_BPP + .bits_per_pixel = -1, +#else .bits_per_pixel = 32, +#endif .flags = TEGRA_FB_FLIP_ON_PROBE, }; @@ -686,7 +690,11 @@ static struct tegra_fb_data cardhu_hdmi_fb_data = { .win = 0, .xres = 640, .yres = 480, +#ifdef CONFIG_TEGRA_DC_USE_HW_BPP + .bits_per_pixel = -1, +#else .bits_per_pixel = 32, +#endif .flags = TEGRA_FB_FLIP_ON_PROBE, }; @@ -873,13 +881,9 @@ static int cardhu_dsi_panel_disable(void) } else if (is_panel_218) { gpio_free(cardhu_dsi_pnl_reset); } else if (is_panel_1506) { - tegra_gpio_disable(e1506_bl_enb); gpio_free(e1506_bl_enb); - tegra_gpio_disable(cardhu_dsi_pnl_reset); gpio_free(cardhu_dsi_pnl_reset); - tegra_gpio_disable(e1506_panel_enb); gpio_free(e1506_panel_enb); - tegra_gpio_disable(e1506_dsi_vddio); gpio_free(e1506_dsi_vddio); } return err; @@ -1213,11 +1217,19 @@ static void cardhu_panel_early_suspend(struct early_suspend *h) fb_blank(registered_fb[0], FB_BLANK_POWERDOWN); if (num_registered_fb > 1) fb_blank(registered_fb[1], FB_BLANK_NORMAL); + +#ifdef CONFIG_TEGRA_CONVSERVATIVE_GOV_ON_EARLYSUPSEND + cpufreq_store_default_gov(); + cpufreq_change_gov(cpufreq_conservative_gov); +#endif } static void cardhu_panel_late_resume(struct early_suspend *h) { unsigned i; +#ifdef CONFIG_TEGRA_CONVSERVATIVE_GOV_ON_EARLYSUPSEND + cpufreq_restore_default_gov(); +#endif for (i = 0; i < num_registered_fb; i++) fb_blank(registered_fb[i], FB_BLANK_UNBLANK); } @@ -1241,6 +1253,9 @@ static void cardhu_panel_preinit(void) cardhu_disp1_out.n_modes = ARRAY_SIZE(cardhu_panel_modes); cardhu_disp1_out.enable = cardhu_panel_enable; cardhu_disp1_out.disable = cardhu_panel_disable; + /* Set height and width in mm. */ + cardhu_disp1_out.height = 125; + cardhu_disp1_out.width = 223; cardhu_disp1_pdata.fb = &cardhu_fb_data; } else { @@ -1262,12 +1277,18 @@ static void cardhu_panel_preinit(void) ARRAY_SIZE(cardhu_dsi_modes_218); cardhu_dsi_fb_data.xres = 864; cardhu_dsi_fb_data.yres = 480; + /* Set height and width in mm. */ + cardhu_disp1_out.height = 47; + cardhu_disp1_out.width = 84; } else if (is_panel_219) { cardhu_disp1_out.modes = cardhu_dsi_modes_219; cardhu_disp1_out.n_modes = ARRAY_SIZE(cardhu_dsi_modes_219); cardhu_dsi_fb_data.xres = 540; cardhu_dsi_fb_data.yres = 960; + /* Set height and width in mm. */ + cardhu_disp1_out.height = 95; + cardhu_disp1_out.width = 53; } else if (is_panel_1506) { cardhu_disp1_out.modes = cardhu_dsi_modes_1506; cardhu_disp1_out.n_modes = @@ -1277,9 +1298,13 @@ static void cardhu_panel_preinit(void) cardhu_dsi.n_suspend_cmd = ARRAY_SIZE(dsi_suspend_cmd_1506); cardhu_dsi.dsi_suspend_cmd = dsi_suspend_cmd_1506; - cardhu_dsi.panel_send_dc_frames = true, + cardhu_dsi.panel_send_dc_frames = true; + cardhu_dsi.suspend_aggr = DSI_HOST_SUSPEND_LV0; cardhu_dsi_fb_data.xres = 720; cardhu_dsi_fb_data.yres = 1280; + /* Set height and width in mm. */ + cardhu_disp1_out.height = 95; + cardhu_disp1_out.width = 53; } cardhu_disp1_pdata.fb = &cardhu_dsi_fb_data; @@ -1328,6 +1353,9 @@ int __init cardhu_panel_init(void) #else cardhu_disp1_out.depth = 24; #endif + /* Set height and width in mm. */ + cardhu_disp1_out.height = 135; + cardhu_disp1_out.width = 217; cardhu_fb_data.xres = 1920; cardhu_fb_data.yres = 1200; @@ -1376,7 +1404,6 @@ skip_lvds: gpio_direction_input(cardhu_hdmi_hpd); #if !(DC_CTRL_MODE & TEGRA_DC_OUT_ONE_SHOT_MODE) - tegra_gpio_enable(e1506_lcd_te); gpio_request(e1506_lcd_te, "lcd_te"); gpio_direction_input(e1506_lcd_te); #endif |