tegra_dc_program_mode(dc, &dc->mode);
}
-static void _tegra_dc_enable(struct tegra_dc *dc)
+static bool _tegra_dc_enable(struct tegra_dc *dc)
{
+ if (dc->mode.pclk == 0)
+ return false;
+
tegra_dc_io_start(dc);
if (dc->out && dc->out->enable)
/* force a full blending update */
dc->blend.z[0] = -1;
+
+ return true;
}
void tegra_dc_enable(struct tegra_dc *dc)
{
mutex_lock(&dc->lock);
- if (!dc->enabled) {
- _tegra_dc_enable(dc);
- dc->enabled = true;
- }
+ if (!dc->enabled)
+ dc->enabled = _tegra_dc_enable(dc);
mutex_unlock(&dc->lock);
}
container_of(to_delayed_work(work), struct tegra_dc_hdmi_data, work);
struct tegra_dc *dc = hdmi->dc;
- if (!tegra_dc_hdmi_detect(dc))
+ if (!tegra_dc_hdmi_detect(dc)) {
tegra_dc_disable(dc);
+ tegra_fb_update_monspecs(dc->fb, NULL, NULL);
+ }
}
static irqreturn_t tegra_dc_hdmi_irq(int irq, void *ptr)
mutex_lock(&fb_info->info->lock);
fb_destroy_modedb(fb_info->info->monspecs.modedb);
+ fb_destroy_modelist(&fb_info->info->modelist);
+
+ if (specs == NULL) {
+ struct tegra_dc_mode mode;
+ memset(&fb_info->info->monspecs, 0x0,
+ sizeof(fb_info->info->monspecs));
+ memset(&mode, 0x0, sizeof(mode));
+ tegra_dc_set_mode(fb_info->win->dc, &mode);
+ mutex_unlock(&fb_info->info->lock);
+ return;
+ }
+
memcpy(&fb_info->info->monspecs, specs,
sizeof(fb_info->info->monspecs));
- fb_destroy_modelist(&fb_info->info->modelist);
-
for (i = 0; i < specs->modedb_len; i++) {
if (mode_filter) {
if (mode_filter(&specs->modedb[i]))