All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'
@ 2021-07-29 19:49 ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2021-07-29 19:49 UTC (permalink / raw)
  To: narmstrong, mchehab, khilman, jbrunet, martin.blumenstingl,
	hverkuil-cisco
  Cc: linux-media, linux-amlogic, linux-arm-kernel, linux-kernel,
	kernel-janitors, Christophe JAILLET

There is likely a typo here. To be consistent, we should compare
'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'.

Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I've not looked deeply in the code, but why is this test needed in the
first place?
Couldn't we assigned 'ctx->out.pix_fmt = fmt' un-conditionally?
---
 drivers/media/platform/meson/ge2d/ge2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c
index a1393fefa8ae..be22bb60e7cf 100644
--- a/drivers/media/platform/meson/ge2d/ge2d.c
+++ b/drivers/media/platform/meson/ge2d/ge2d.c
@@ -780,7 +780,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
 		 * parameters, take them in account
 		 */
 		if (fmt.width != ctx->out.pix_fmt.width ||
-		    fmt.height != ctx->out.pix_fmt.width ||
+		    fmt.height != ctx->out.pix_fmt.height ||
 		    fmt.bytesperline > ctx->out.pix_fmt.bytesperline ||
 		    fmt.sizeimage > ctx->out.pix_fmt.sizeimage)
 			ctx->out.pix_fmt = fmt;
-- 
2.30.2


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

* [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'
@ 2021-07-29 19:49 ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2021-07-29 19:49 UTC (permalink / raw)
  To: narmstrong, mchehab, khilman, jbrunet, martin.blumenstingl,
	hverkuil-cisco
  Cc: linux-media, linux-amlogic, linux-arm-kernel, linux-kernel,
	kernel-janitors, Christophe JAILLET

There is likely a typo here. To be consistent, we should compare
'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'.

Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I've not looked deeply in the code, but why is this test needed in the
first place?
Couldn't we assigned 'ctx->out.pix_fmt = fmt' un-conditionally?
---
 drivers/media/platform/meson/ge2d/ge2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c
index a1393fefa8ae..be22bb60e7cf 100644
--- a/drivers/media/platform/meson/ge2d/ge2d.c
+++ b/drivers/media/platform/meson/ge2d/ge2d.c
@@ -780,7 +780,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
 		 * parameters, take them in account
 		 */
 		if (fmt.width != ctx->out.pix_fmt.width ||
-		    fmt.height != ctx->out.pix_fmt.width ||
+		    fmt.height != ctx->out.pix_fmt.height ||
 		    fmt.bytesperline > ctx->out.pix_fmt.bytesperline ||
 		    fmt.sizeimage > ctx->out.pix_fmt.sizeimage)
 			ctx->out.pix_fmt = fmt;
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'
@ 2021-07-29 19:49 ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2021-07-29 19:49 UTC (permalink / raw)
  To: narmstrong, mchehab, khilman, jbrunet, martin.blumenstingl,
	hverkuil-cisco
  Cc: linux-media, linux-amlogic, linux-arm-kernel, linux-kernel,
	kernel-janitors, Christophe JAILLET

There is likely a typo here. To be consistent, we should compare
'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'.

Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I've not looked deeply in the code, but why is this test needed in the
first place?
Couldn't we assigned 'ctx->out.pix_fmt = fmt' un-conditionally?
---
 drivers/media/platform/meson/ge2d/ge2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c
index a1393fefa8ae..be22bb60e7cf 100644
--- a/drivers/media/platform/meson/ge2d/ge2d.c
+++ b/drivers/media/platform/meson/ge2d/ge2d.c
@@ -780,7 +780,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
 		 * parameters, take them in account
 		 */
 		if (fmt.width != ctx->out.pix_fmt.width ||
-		    fmt.height != ctx->out.pix_fmt.width ||
+		    fmt.height != ctx->out.pix_fmt.height ||
 		    fmt.bytesperline > ctx->out.pix_fmt.bytesperline ||
 		    fmt.sizeimage > ctx->out.pix_fmt.sizeimage)
 			ctx->out.pix_fmt = fmt;
-- 
2.30.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'
  2021-07-29 19:49 ` Christophe JAILLET
  (?)
@ 2021-07-30 10:50   ` Neil Armstrong
  -1 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-07-30 10:50 UTC (permalink / raw)
  To: Christophe JAILLET, mchehab, khilman, jbrunet,
	martin.blumenstingl, hverkuil-cisco
  Cc: linux-media, linux-amlogic, linux-arm-kernel, linux-kernel,
	kernel-janitors

Hi,

On 29/07/2021 21:49, Christophe JAILLET wrote:
> There is likely a typo here. To be consistent, we should compare
> 'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'.

You're right, it's typo.

> 
> Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> I've not looked deeply in the code, but why is this test needed in the
> first place?
> Couldn't we assigned 'ctx->out.pix_fmt = fmt' un-conditionally?

We could indeed, and with the typo you discovered it's already the case so the test could go away.

> ---
>  drivers/media/platform/meson/ge2d/ge2d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c
> index a1393fefa8ae..be22bb60e7cf 100644
> --- a/drivers/media/platform/meson/ge2d/ge2d.c
> +++ b/drivers/media/platform/meson/ge2d/ge2d.c
> @@ -780,7 +780,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
>  		 * parameters, take them in account
>  		 */
>  		if (fmt.width != ctx->out.pix_fmt.width ||
> -		    fmt.height != ctx->out.pix_fmt.width ||
> +		    fmt.height != ctx->out.pix_fmt.height ||
>  		    fmt.bytesperline > ctx->out.pix_fmt.bytesperline ||
>  		    fmt.sizeimage > ctx->out.pix_fmt.sizeimage)
>  			ctx->out.pix_fmt = fmt;
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

(please keep it if you re-spin by removing the test entirely)

Neil

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

* Re: [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'
@ 2021-07-30 10:50   ` Neil Armstrong
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-07-30 10:50 UTC (permalink / raw)
  To: Christophe JAILLET, mchehab, khilman, jbrunet,
	martin.blumenstingl, hverkuil-cisco
  Cc: linux-media, linux-amlogic, linux-arm-kernel, linux-kernel,
	kernel-janitors

Hi,

On 29/07/2021 21:49, Christophe JAILLET wrote:
> There is likely a typo here. To be consistent, we should compare
> 'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'.

You're right, it's typo.

> 
> Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> I've not looked deeply in the code, but why is this test needed in the
> first place?
> Couldn't we assigned 'ctx->out.pix_fmt = fmt' un-conditionally?

We could indeed, and with the typo you discovered it's already the case so the test could go away.

> ---
>  drivers/media/platform/meson/ge2d/ge2d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c
> index a1393fefa8ae..be22bb60e7cf 100644
> --- a/drivers/media/platform/meson/ge2d/ge2d.c
> +++ b/drivers/media/platform/meson/ge2d/ge2d.c
> @@ -780,7 +780,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
>  		 * parameters, take them in account
>  		 */
>  		if (fmt.width != ctx->out.pix_fmt.width ||
> -		    fmt.height != ctx->out.pix_fmt.width ||
> +		    fmt.height != ctx->out.pix_fmt.height ||
>  		    fmt.bytesperline > ctx->out.pix_fmt.bytesperline ||
>  		    fmt.sizeimage > ctx->out.pix_fmt.sizeimage)
>  			ctx->out.pix_fmt = fmt;
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

(please keep it if you re-spin by removing the test entirely)

Neil

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'
@ 2021-07-30 10:50   ` Neil Armstrong
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2021-07-30 10:50 UTC (permalink / raw)
  To: Christophe JAILLET, mchehab, khilman, jbrunet,
	martin.blumenstingl, hverkuil-cisco
  Cc: linux-media, linux-amlogic, linux-arm-kernel, linux-kernel,
	kernel-janitors

Hi,

On 29/07/2021 21:49, Christophe JAILLET wrote:
> There is likely a typo here. To be consistent, we should compare
> 'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'.

You're right, it's typo.

> 
> Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> I've not looked deeply in the code, but why is this test needed in the
> first place?
> Couldn't we assigned 'ctx->out.pix_fmt = fmt' un-conditionally?

We could indeed, and with the typo you discovered it's already the case so the test could go away.

> ---
>  drivers/media/platform/meson/ge2d/ge2d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c
> index a1393fefa8ae..be22bb60e7cf 100644
> --- a/drivers/media/platform/meson/ge2d/ge2d.c
> +++ b/drivers/media/platform/meson/ge2d/ge2d.c
> @@ -780,7 +780,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
>  		 * parameters, take them in account
>  		 */
>  		if (fmt.width != ctx->out.pix_fmt.width ||
> -		    fmt.height != ctx->out.pix_fmt.width ||
> +		    fmt.height != ctx->out.pix_fmt.height ||
>  		    fmt.bytesperline > ctx->out.pix_fmt.bytesperline ||
>  		    fmt.sizeimage > ctx->out.pix_fmt.sizeimage)
>  			ctx->out.pix_fmt = fmt;
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

(please keep it if you re-spin by removing the test entirely)

Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2021-07-30 10:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 19:49 [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()' Christophe JAILLET
2021-07-29 19:49 ` Christophe JAILLET
2021-07-29 19:49 ` Christophe JAILLET
2021-07-30 10:50 ` Neil Armstrong
2021-07-30 10:50   ` Neil Armstrong
2021-07-30 10:50   ` Neil Armstrong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.