Skip to contentSkip to conversation

video: simplefb: add rotation support

PATCH In review Takumi Sueda 2 participants 2 messages Sep 13, 2022 – Oct 31, 2022 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 video: simplefb: add rotation support

It introduces the way to rotate the screen for boards with rotated screen.

---
 drivers/video/simplefb.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/video/simplefb.c +5 -1
index 2b0d8835e3..235ec761f7 100644
@@ -43,7 +43,11 @@ static int simple_video_probe(struct udevice *dev)
 
 	uc_priv->xsize = fdtdec_get_uint(blob, node, "width", 0);
 	uc_priv->ysize = fdtdec_get_uint(blob, node, "height", 0);
-	uc_priv->rot = 0;
+	uc_priv->rot = fdtdec_get_uint(blob, node, "rot", 0);
+	if (uc_priv->rot > 3) {
+		log_debug("%s: invalid rot\n", __func__);
+		return log_msg_ret("rot", -EINVAL);
+	}
 
 	format = fdt_getprop(blob, node, "format", NULL);
 	debug("%s: %dx%d@%s\n", __func__, uc_priv->xsize, uc_priv->ysize, format);
Signature · 1 line
2.20.1
#1 lore raw
Quoted 6 lines · On Tue, 13 Sep 2022 18:32:42 +0900 Takumi Sueda [email protected] wrote:

It introduces the way to rotate the screen for boards with rotated screen.

---
 drivers/video/simplefb.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Applied to u-boot-video/master, thanks!

--
Anatolij