public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 1/1] video: simplefb: Add rotation support
@ 2022-09-13  9:21 Takumi Sueda
  2022-09-13  9:29 ` Takumi Sueda
  0 siblings, 1 reply; 2+ messages in thread
From: Takumi Sueda @ 2022-09-13  9:21 UTC (permalink / raw)
  To: u-boot; +Cc: agust, sjg, Takumi Sueda

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 1/1] video: simplefb: Add rotation support
  2022-09-13  9:21 [PATCH v2 1/1] video: simplefb: Add rotation support Takumi Sueda
@ 2022-09-13  9:29 ` Takumi Sueda
  0 siblings, 0 replies; 2+ messages in thread
From: Takumi Sueda @ 2022-09-13  9:29 UTC (permalink / raw)
  To: u-boot; +Cc: agust, sjg

On Tue, Sep 13, 2022 at 06:21:10PM +0900, Takumi Sueda wrote:
> 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
> 

Uh oh, I forgot to add the description. I'll send the v3.
Sorry for sending an incomplete patch.

Takumi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-13  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13  9:21 [PATCH v2 1/1] video: simplefb: Add rotation support Takumi Sueda
2022-09-13  9:29 ` Takumi Sueda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox