Based on sail-imx6q uboot, LCD screen display is selected by default when starting

Time:2020-6-29

LCD screen display is selected by default when the uboot of imx6 is started
First of all, we need to change the / uboot / board / Freescale / mx6sabresd. C file, as shown in the figure:
Revise as follows:
struct display_info_t const displays[] = {{

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = enable_lvds,
.mode    = {
    .name           = "Hannstar-XGA",
    .refresh        = 60,
    .xres           = 1920,
    .yres           = 1080,
    .pixclock       = 6734,
    .left_margin    = 90,
    .right_margin   = 50,
    .upper_margin   = 30,
    .lower_margin   = 6,
    .hsync_len      = 24,
    .vsync_len      = 3,
    .sync           = FB_SYNC_EXT,
    .vmode          = FB_VMODE_NONINTERLACED

} }, {

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = do_enable_hdmi,
.mode    = {
    .name           = "HDMI",
    .refresh        = 60,
    .xres           = 640,
    .yres           = 480,
    .pixclock       = 39721,
    .left_margin    = 48,
    .right_margin   = 16,
    .upper_margin   = 33,
    .lower_margin   = 10,
    .hsync_len      = 96,
    .vsync_len      = 2,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} }, {

.bus    = 0,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = enable_rgb,
.mode    = {
    .name           = "SEIKO-WVGA",
    .refresh        = 60,
    .xres           = 800,
    .yres           = 480,
    .pixclock       = 29850,
    .left_margin    = 89,
    .right_margin   = 164,
    .upper_margin   = 23,
    .lower_margin   = 10,
    .hsync_len      = 10,
    .vsync_len      = 10,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} } };
size_t display_count = ARRAY_SIZE(displays);

After modification, it is shown as follows:

struct display_info_t const displays[] = {{

.bus    = 0,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = enable_rgb,
.mode    = {
    .name           = "CLAA-WVGA",
    .refresh        = 57,
    .xres           = 800,
    .yres           = 480,
    .pixclock       = 37037,
    .left_margin    = 40,
    .right_margin   = 60,
    .upper_margin   = 10,
    .lower_margin   = 10,
    .hsync_len      = 20,
    .vsync_len      = 10,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} },{

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB666,
.detect    = NULL,
.enable    = enable_lvds,
.mode    = {
    .name           = "Hannstar-XGA",
    .refresh        = 60,
    .xres           = 1024,
    .yres           = 768,
    .pixclock       = 15385,
    .left_margin    = 220,
    .right_margin   = 40,
    .upper_margin   = 21,
    .lower_margin   = 7,
    .hsync_len      = 60,
    .vsync_len      = 10,
    .sync           = FB_SYNC_EXT,
    .vmode          = FB_VMODE_NONINTERLACED

} }, {

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = do_enable_hdmi,
.mode    = {
    .name           = "HDMI",
    .refresh        = 60,
    .xres           = 640,
    .yres           = 480,
    .pixclock       = 39721,
    .left_margin    = 48,
    .right_margin   = 16,
    .upper_margin   = 33,
    .lower_margin   = 10,
    .hsync_len      = 96,
    .vsync_len      = 2,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} } };
size_t display_count = ARRAY_SIZE(displays);