summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-16 06:38:59 +0300
committerBin Meng <bmeng@tinylab.org>2023-07-17 12:12:26 +0300
commit03fe79c091cee0bd591070dd24adfa8f556b50df (patch)
tree4bd915467709328e0e7cd567246cdb619ea29167 /include
parent5345700d2af425a8c5a36c078db5d71bf31280c7 (diff)
downloadu-boot-03fe79c091cee0bd591070dd24adfa8f556b50df.tar.xz
x86: Pass video settings from SPL to U-Boot proper
When video is set up in SPL, U-Boot proper needs to use the correct parameters so it can write to the display. Put these in a bloblist so they are available to U-Boot proper. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/bloblist.h1
-rw-r--r--include/video.h24
2 files changed, 25 insertions, 0 deletions
diff --git a/include/bloblist.h b/include/bloblist.h
index 2a2f1700eb..7ea72c6bd4 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -113,6 +113,7 @@ enum bloblist_tag_t {
BLOBLISTT_PROJECT_AREA = 0x8000,
BLOBLISTT_U_BOOT_SPL_HANDOFF = 0x8000, /* Hand-off info from SPL */
BLOBLISTT_VBE = 0x8001, /* VBE per-phase state */
+ BLOBLISTT_U_BOOT_VIDEO = 0x8002, /* Video information from SPL */
/*
* Vendor-specific tags are permitted here. Projects can be open source
diff --git a/include/video.h b/include/video.h
index e98d0f9c89..9729fa348a 100644
--- a/include/video.h
+++ b/include/video.h
@@ -134,6 +134,30 @@ struct video_ops {
#define video_get_ops(dev) ((struct video_ops *)(dev)->driver->ops)
+/**
+ * struct video_handoff - video information passed from SPL
+ *
+ * This is used when video is set up by SPL, to provide the details to U-Boot
+ * proper.
+ *
+ * @fb: Base address of frame buffer, 0 if not yet known
+ * @size: Frame-buffer size, in bytes
+ * @xsize: Number of pixel columns (e.g. 1366)
+ * @ysize: Number of pixels rows (e.g.. 768)
+ * @line_length: Length of each frame buffer line, in bytes. This can be
+ * set by the driver, but if not, the uclass will set it after
+ * probing
+ * @bpix: Encoded bits per pixel (enum video_log2_bpp)
+ */
+struct video_handoff {
+ u64 fb;
+ u32 size;
+ u16 xsize;
+ u16 ysize;
+ u32 line_length;
+ u8 bpix;
+};
+
/** enum colour_idx - the 16 colors supported by consoles */
enum colour_idx {
VID_BLACK = 0,