From: Takumi Sueda <puhitaku@gmail.com>
To: u-boot@lists.denx.de
Cc: agust@denx.de, sjg@chromium.org, Takumi Sueda <puhitaku@gmail.com>
Subject: [PATCH v2 1/1] video: simplefb: Add rotation support
Date: Tue, 13 Sep 2022 18:21:10 +0900 [thread overview]
Message-ID: <20220913092110.13606-1-puhitaku@gmail.com> (raw)
Signed-off-by: Takumi Sueda <puhitaku@gmail.com>
---
drivers/video/simplefb.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index 2b0d8835e3..235ec761f7 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -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);
--
2.20.1
next reply other threads:[~2022-09-13 9:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 9:21 Takumi Sueda [this message]
2022-09-13 9:29 ` [PATCH v2 1/1] video: simplefb: Add rotation support Takumi Sueda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220913092110.13606-1-puhitaku@gmail.com \
--to=puhitaku@gmail.com \
--cc=agust@denx.de \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox