struct sunxi_display {
GraphicDevice graphic_device;
- bool enabled;
enum sunxi_monitor monitor;
unsigned int depth;
} sunxi_display;
case sunxi_monitor_hdmi:
#ifndef CONFIG_VIDEO_HDMI
printf("HDMI/DVI not supported on this board\n");
+ sunxi_display.monitor = sunxi_monitor_none;
return NULL;
#else
/* Always call hdp_detect, as it also enables clocks, etc. */
sunxi_hdmi_shutdown();
- if (lcd_mode[0] == 0)
+ if (lcd_mode[0] == 0) {
+ sunxi_display.monitor = sunxi_monitor_none;
return NULL; /* No LCD, bail */
+ }
/* Fall back / through to LCD */
sunxi_display.monitor = sunxi_monitor_lcd;
break;
}
printf("LCD not supported on this board\n");
+ sunxi_display.monitor = sunxi_monitor_none;
return NULL;
case sunxi_monitor_vga:
#ifdef CONFIG_VIDEO_VGA_VIA_LCD
break;
#else
printf("VGA not supported on this board\n");
+ sunxi_display.monitor = sunxi_monitor_none;
return NULL;
#endif
}
mode->yres, sunxi_get_mon_desc(sunxi_display.monitor));
}
- sunxi_display.enabled = true;
sunxi_engines_init();
sunxi_mode_set(mode, gd->fb_base - CONFIG_SYS_SDRAM_BASE);
int offset, ret;
const char *pipeline = NULL;
- if (!sunxi_display.enabled)
- return 0;
-
switch (sunxi_display.monitor) {
case sunxi_monitor_none:
return 0;