summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/dc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r--drivers/video/tegra/dc/dc.c48
1 files changed, 2 insertions, 46 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index ed54e9e..13e094a 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -58,21 +58,6 @@
#define DC_COM_PIN_OUTPUT_POLARITY1_INIT_VAL 0x01000000
#define DC_COM_PIN_OUTPUT_POLARITY3_INIT_VAL 0x0
-static struct fb_videomode tegra_dc_hdmi_fallback_mode = {
- .refresh = 60,
- .xres = 640,
- .yres = 480,
- .pixclock = KHZ2PICOS(25200),
- .hsync_len = 96, /* h_sync_width */
- .vsync_len = 2, /* v_sync_width */
- .left_margin = 48, /* h_back_porch */
- .upper_margin = 33, /* v_back_porch */
- .right_margin = 16, /* h_front_porch */
- .lower_margin = 10, /* v_front_porch */
- .vmode = 0,
- .sync = 0,
-};
-
static struct tegra_dc_mode override_disp_mode[3];
static void _tegra_dc_controller_disable(struct tegra_dc *dc);
@@ -1458,34 +1443,6 @@ static bool _tegra_dc_controller_reset_enable(struct tegra_dc *dc)
}
#endif
-static int _tegra_dc_set_default_videomode(struct tegra_dc *dc)
-{
- if (dc->mode.pclk == 0) {
- switch (dc->out->type) {
- case TEGRA_DC_OUT_HDMI:
- /* DC enable called but no videomode is loaded.
- Check if HDMI is connected, then set fallback mdoe */
- if (tegra_dc_hpd(dc)) {
- return tegra_dc_set_fb_mode(dc,
- &tegra_dc_hdmi_fallback_mode, 0);
- } else
- return false;
-
- break;
-
- /* Do nothing for other outputs for now */
- case TEGRA_DC_OUT_RGB:
-
- case TEGRA_DC_OUT_DSI:
-
- default:
- return false;
- }
- }
-
- return false;
-}
-
static bool _tegra_dc_enable(struct tegra_dc *dc)
{
if (dc->mode.pclk == 0)
@@ -1914,6 +1871,7 @@ static int tegra_dc_probe(struct nvhost_device *ndev,
}
dc->fb = tegra_fb_register(ndev, dc, dc->pdata->fb, fb_mem);
+
if (IS_ERR_OR_NULL(dc->fb))
dc->fb = NULL;
}
@@ -2028,10 +1986,8 @@ static int tegra_dc_resume(struct nvhost_device *ndev)
mutex_lock(&dc->lock);
dc->suspended = false;
- if (dc->enabled) {
- _tegra_dc_set_default_videomode(dc);
+ if (dc->enabled)
_tegra_dc_enable(dc);
- }
if (dc->out && dc->out->hotplug_init)
dc->out->hotplug_init();