mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
video: tegra: fix crash when no HDMI modes are supported
Change-Id: I2e23d018d5acb814e7a088921c26c8f305790442 Signed-off-by: Erik Gilling <konkers@android.com>
This commit is contained in:
@@ -604,15 +604,21 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
|
||||
}
|
||||
}
|
||||
|
||||
/* in case the first mode was not matched */
|
||||
m = list_first_entry(&fb_info->info->modelist, struct fb_modelist, list);
|
||||
m->mode.flag |= FB_MODE_IS_FIRST;
|
||||
if (list_empty(&fb_info->info->modelist)) {
|
||||
struct tegra_dc_mode mode;
|
||||
memset(&fb_info->info->var, 0x0, sizeof(fb_info->info->var));
|
||||
memset(&mode, 0x0, sizeof(mode));
|
||||
tegra_dc_set_mode(fb_info->win->dc, &mode);
|
||||
} else {
|
||||
/* in case the first mode was not matched */
|
||||
m = list_first_entry(&fb_info->info->modelist, struct fb_modelist, list);
|
||||
m->mode.flag |= FB_MODE_IS_FIRST;
|
||||
fb_info->info->mode = (struct fb_videomode *)
|
||||
fb_find_best_display(specs, &fb_info->info->modelist);
|
||||
|
||||
fb_info->info->mode = (struct fb_videomode *)
|
||||
fb_find_best_display(specs, &fb_info->info->modelist);
|
||||
|
||||
fb_videomode_to_var(&fb_info->info->var, fb_info->info->mode);
|
||||
tegra_fb_set_par(fb_info->info);
|
||||
fb_videomode_to_var(&fb_info->info->var, fb_info->info->mode);
|
||||
tegra_fb_set_par(fb_info->info);
|
||||
}
|
||||
|
||||
event.info = fb_info->info;
|
||||
fb_notifier_call_chain(FB_EVENT_NEW_MODELIST, &event);
|
||||
|
||||
Reference in New Issue
Block a user