]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: video: Allow selection of rotated console
authorSimon Glass <sjg@chromium.org>
Fri, 3 Jul 2020 03:12:15 +0000 (21:12 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 9 Jul 2020 04:33:24 +0000 (12:33 +0800)
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>
drivers/video/sandbox_sdl.c

index 20248e660750604577aa50d03b10f39c1127de49..c678e728dbb95d963472b1001728d5602edbdde0 100644 (file)
@@ -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);