summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-03 06:12:15 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-07-09 07:33:24 +0300
commit6a2ea434ea9f38fff6b133b5b8cc4db302a1a84c (patch)
tree50e934b50de01d6b77687268e1561678842a44d0 /drivers/video
parent8b763dfdeebc2eb9c23e00a26aa3872b90958ba3 (diff)
downloadu-boot-6a2ea434ea9f38fff6b133b5b8cc4db302a1a84c.tar.xz
sandbox: video: Allow selection of rotated console
Add a devicetree property to select a rotated console. This uses the same encoding as vidconsole itself: 0=normal; 1=90 degrees clockwise, 2=upside down, 3=90 degrees anticlockwise. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/sandbox_sdl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 20248e6607..c678e728db 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -53,6 +53,7 @@ static int sandbox_sdl_bind(struct udevice *dev)
plat->xres = dev_read_u32_default(dev, "xres", LCD_MAX_WIDTH);
plat->yres = dev_read_u32_default(dev, "yres", LCD_MAX_HEIGHT);
plat->bpix = dev_read_u32_default(dev, "log2-depth", VIDEO_BPP16);
+ plat->rot = dev_read_u32_default(dev, "rotate", 0);
uc_plat->size = plat->xres * plat->yres * (1 << plat->bpix) / 8;
debug("%s: Frame buffer size %x\n", __func__, uc_plat->size);