pci: video: Set up the pixel-format field
Add this information to the handoff structure so that it is available to U-Boot proper. Update bochs and the video handoff. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -347,6 +347,7 @@ int vesa_setup_video_priv(struct vesa_mode_info *vesa, u64 fb,
|
|||||||
case 32:
|
case 32:
|
||||||
case 24:
|
case 24:
|
||||||
uc_priv->bpix = VIDEO_BPP32;
|
uc_priv->bpix = VIDEO_BPP32;
|
||||||
|
uc_priv->format = VIDEO_X8B8G8R8;
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
uc_priv->bpix = VIDEO_BPP16;
|
uc_priv->bpix = VIDEO_BPP16;
|
||||||
@@ -392,6 +393,7 @@ int vesa_setup_video(struct udevice *dev, int (*int15_handler)(void))
|
|||||||
uc_priv->ysize = ho->ysize;
|
uc_priv->ysize = ho->ysize;
|
||||||
uc_priv->line_length = ho->line_length;
|
uc_priv->line_length = ho->line_length;
|
||||||
uc_priv->bpix = ho->bpix;
|
uc_priv->bpix = ho->bpix;
|
||||||
|
uc_priv->format = ho->format;
|
||||||
} else {
|
} else {
|
||||||
bootstage_start(BOOTSTAGE_ID_ACCUM_LCD, "vesa display");
|
bootstage_start(BOOTSTAGE_ID_ACCUM_LCD, "vesa display");
|
||||||
ret = dm_pci_run_vga_bios(dev, int15_handler,
|
ret = dm_pci_run_vga_bios(dev, int15_handler,
|
||||||
@@ -438,6 +440,7 @@ int vesa_setup_video(struct udevice *dev, int (*int15_handler)(void))
|
|||||||
ho->ysize = uc_priv->ysize;
|
ho->ysize = uc_priv->ysize;
|
||||||
ho->line_length = uc_priv->line_length;
|
ho->line_length = uc_priv->line_length;
|
||||||
ho->bpix = uc_priv->bpix;
|
ho->bpix = uc_priv->bpix;
|
||||||
|
ho->format = uc_priv->format;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -64,6 +64,7 @@ static int bochs_init_fb(struct udevice *dev)
|
|||||||
uc_priv->xsize = xsize;
|
uc_priv->xsize = xsize;
|
||||||
uc_priv->ysize = ysize;
|
uc_priv->ysize = ysize;
|
||||||
uc_priv->bpix = VIDEO_BPP32;
|
uc_priv->bpix = VIDEO_BPP32;
|
||||||
|
uc_priv->format = VIDEO_X8B8G8R8;
|
||||||
|
|
||||||
/* setup video mode */
|
/* setup video mode */
|
||||||
bochs_write(mmio, INDEX_ENABLE, 0);
|
bochs_write(mmio, INDEX_ENABLE, 0);
|
||||||
|
@@ -589,6 +589,7 @@ static int video_post_probe(struct udevice *dev)
|
|||||||
ho->ysize = priv->ysize;
|
ho->ysize = priv->ysize;
|
||||||
ho->line_length = priv->line_length;
|
ho->line_length = priv->line_length;
|
||||||
ho->bpix = priv->bpix;
|
ho->bpix = priv->bpix;
|
||||||
|
ho->format = priv->format;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_VIDEO_COPY) && plat->copy_base)
|
if (IS_ENABLED(CONFIG_VIDEO_COPY) && plat->copy_base)
|
||||||
|
@@ -150,6 +150,7 @@ struct video_ops {
|
|||||||
* set by the driver, but if not, the uclass will set it after
|
* set by the driver, but if not, the uclass will set it after
|
||||||
* probing
|
* probing
|
||||||
* @bpix: Encoded bits per pixel (enum video_log2_bpp)
|
* @bpix: Encoded bits per pixel (enum video_log2_bpp)
|
||||||
|
* @format: Video format (enum video_format)
|
||||||
*/
|
*/
|
||||||
struct video_handoff {
|
struct video_handoff {
|
||||||
u64 fb;
|
u64 fb;
|
||||||
@@ -158,6 +159,7 @@ struct video_handoff {
|
|||||||
u16 ysize;
|
u16 ysize;
|
||||||
u32 line_length;
|
u32 line_length;
|
||||||
u8 bpix;
|
u8 bpix;
|
||||||
|
u8 format;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** enum colour_idx - the 16 colors supported by consoles */
|
/** enum colour_idx - the 16 colors supported by consoles */
|
||||||
|
Reference in New Issue
Block a user