diff mbox series

[04/26] sandbox: video: Allow selection of rotated console

Message ID 20200519231058.19945-5-sjg@chromium.org
State Superseded
Headers show
Series x86: video: Speed up the framebuffer | expand

Commit Message

Simon Glass May 19, 2020, 11:10 p.m. UTC
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 at chromium.org>
---

 drivers/video/sandbox_sdl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Anatolij Gustschin May 22, 2020, 1:51 p.m. UTC | #1
On Tue, 19 May 2020 17:10:36 -0600
Simon Glass sjg at chromium.org wrote:

> 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 at chromium.org>

Reviewed-by: Anatolij Gustschin <agust at denx.de>
diff mbox series

Patch

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);