All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: Fix macros in sun8i_csc.h
@ 2021-08-31 18:48 ` Jernej Skrabec
  0 siblings, 0 replies; 7+ messages in thread
From: Jernej Skrabec @ 2021-08-31 18:48 UTC (permalink / raw)
  To: mripard, wens
  Cc: airlied, daniel, dri-devel, linux-arm-kernel, linux-sunxi,
	linux-kernel, Jernej Skrabec, stable, Roman Stratiienko

Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
recommendation of having arguments enclosed in parenthesis. While that
didn't change anything for quiet sometime, it actually become important
after CSC code rework with commit ea067aee45a8 ("drm/sun4i: de2/de3:
Remove redundant CSC matrices").

Without this fix, colours are completely off for supported YVU formats
on SoCs with DE2 (A64, H3, R40, etc.).

Fix the issue by enclosing macro arguments in parenthesis.

Cc: stable@vger.kernel.org # 5.12+
Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 drivers/gpu/drm/sun4i/sun8i_csc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun8i_csc.h b/drivers/gpu/drm/sun4i/sun8i_csc.h
index a55a38ad849c..022cafa6c06c 100644
--- a/drivers/gpu/drm/sun4i/sun8i_csc.h
+++ b/drivers/gpu/drm/sun4i/sun8i_csc.h
@@ -16,8 +16,8 @@ struct sun8i_mixer;
 #define CCSC10_OFFSET 0xA0000
 #define CCSC11_OFFSET 0xF0000
 
-#define SUN8I_CSC_CTRL(base)		(base + 0x0)
-#define SUN8I_CSC_COEFF(base, i)	(base + 0x10 + 4 * i)
+#define SUN8I_CSC_CTRL(base)		((base) + 0x0)
+#define SUN8I_CSC_COEFF(base, i)	((base) + 0x10 + 4 * (i))
 
 #define SUN8I_CSC_CTRL_EN		BIT(0)
 
-- 
2.33.0


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

* [PATCH] drm/sun4i: Fix macros in sun8i_csc.h
@ 2021-08-31 18:48 ` Jernej Skrabec
  0 siblings, 0 replies; 7+ messages in thread
From: Jernej Skrabec @ 2021-08-31 18:48 UTC (permalink / raw)
  To: mripard, wens
  Cc: airlied, daniel, dri-devel, linux-arm-kernel, linux-sunxi,
	linux-kernel, Jernej Skrabec, stable, Roman Stratiienko

Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
recommendation of having arguments enclosed in parenthesis. While that
didn't change anything for quiet sometime, it actually become important
after CSC code rework with commit ea067aee45a8 ("drm/sun4i: de2/de3:
Remove redundant CSC matrices").

Without this fix, colours are completely off for supported YVU formats
on SoCs with DE2 (A64, H3, R40, etc.).

Fix the issue by enclosing macro arguments in parenthesis.

Cc: stable@vger.kernel.org # 5.12+
Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 drivers/gpu/drm/sun4i/sun8i_csc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun8i_csc.h b/drivers/gpu/drm/sun4i/sun8i_csc.h
index a55a38ad849c..022cafa6c06c 100644
--- a/drivers/gpu/drm/sun4i/sun8i_csc.h
+++ b/drivers/gpu/drm/sun4i/sun8i_csc.h
@@ -16,8 +16,8 @@ struct sun8i_mixer;
 #define CCSC10_OFFSET 0xA0000
 #define CCSC11_OFFSET 0xF0000
 
-#define SUN8I_CSC_CTRL(base)		(base + 0x0)
-#define SUN8I_CSC_COEFF(base, i)	(base + 0x10 + 4 * i)
+#define SUN8I_CSC_CTRL(base)		((base) + 0x0)
+#define SUN8I_CSC_COEFF(base, i)	((base) + 0x10 + 4 * (i))
 
 #define SUN8I_CSC_CTRL_EN		BIT(0)
 
-- 
2.33.0


_______________________________________________
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] 7+ messages in thread

* Re: [PATCH] drm/sun4i: Fix macros in sun8i_csc.h
  2021-08-31 18:48 ` Jernej Skrabec
  (?)
@ 2021-09-01  3:13   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2021-09-01  3:13 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: Maxime Ripard, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel, stable,
	Roman Stratiienko

On Wed, Sep 1, 2021 at 2:48 AM Jernej Skrabec <jernej.skrabec@gmail.com> wrote:
>
> Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
> recommendation of having arguments enclosed in parenthesis. While that
> didn't change anything for quiet sometime, it actually become important

                             ^ Typo

> after CSC code rework with commit ea067aee45a8 ("drm/sun4i: de2/de3:
> Remove redundant CSC matrices").
>
> Without this fix, colours are completely off for supported YVU formats
> on SoCs with DE2 (A64, H3, R40, etc.).
>
> Fix the issue by enclosing macro arguments in parenthesis.
>
> Cc: stable@vger.kernel.org # 5.12+
> Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library")
> Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Otherwise,

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH] drm/sun4i: Fix macros in sun8i_csc.h
@ 2021-09-01  3:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2021-09-01  3:13 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: Maxime Ripard, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel, stable,
	Roman Stratiienko

On Wed, Sep 1, 2021 at 2:48 AM Jernej Skrabec <jernej.skrabec@gmail.com> wrote:
>
> Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
> recommendation of having arguments enclosed in parenthesis. While that
> didn't change anything for quiet sometime, it actually become important

                             ^ Typo

> after CSC code rework with commit ea067aee45a8 ("drm/sun4i: de2/de3:
> Remove redundant CSC matrices").
>
> Without this fix, colours are completely off for supported YVU formats
> on SoCs with DE2 (A64, H3, R40, etc.).
>
> Fix the issue by enclosing macro arguments in parenthesis.
>
> Cc: stable@vger.kernel.org # 5.12+
> Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library")
> Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Otherwise,

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH] drm/sun4i: Fix macros in sun8i_csc.h
@ 2021-09-01  3:13   ` Chen-Yu Tsai
  0 siblings, 0 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2021-09-01  3:13 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: Maxime Ripard, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel, stable,
	Roman Stratiienko

On Wed, Sep 1, 2021 at 2:48 AM Jernej Skrabec <jernej.skrabec@gmail.com> wrote:
>
> Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
> recommendation of having arguments enclosed in parenthesis. While that
> didn't change anything for quiet sometime, it actually become important

                             ^ Typo

> after CSC code rework with commit ea067aee45a8 ("drm/sun4i: de2/de3:
> Remove redundant CSC matrices").
>
> Without this fix, colours are completely off for supported YVU formats
> on SoCs with DE2 (A64, H3, R40, etc.).
>
> Fix the issue by enclosing macro arguments in parenthesis.
>
> Cc: stable@vger.kernel.org # 5.12+
> Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library")
> Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Otherwise,

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH] drm/sun4i: Fix macros in sun8i_csc.h
  2021-09-01  3:13   ` Chen-Yu Tsai
@ 2021-09-01  9:44     ` Maxime Ripard
  -1 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2021-09-01  9:44 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel, stable,
	Roman Stratiienko

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

On Wed, Sep 01, 2021 at 11:13:01AM +0800, Chen-Yu Tsai wrote:
> On Wed, Sep 1, 2021 at 2:48 AM Jernej Skrabec <jernej.skrabec@gmail.com> wrote:
> >
> > Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
> > recommendation of having arguments enclosed in parenthesis. While that
> > didn't change anything for quiet sometime, it actually become important
> 
>                              ^ Typo
> 
> > after CSC code rework with commit ea067aee45a8 ("drm/sun4i: de2/de3:
> > Remove redundant CSC matrices").
> >
> > Without this fix, colours are completely off for supported YVU formats
> > on SoCs with DE2 (A64, H3, R40, etc.).
> >
> > Fix the issue by enclosing macro arguments in parenthesis.
> >
> > Cc: stable@vger.kernel.org # 5.12+
> > Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library")
> > Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> 
> Otherwise,
> 
> Reviewed-by: Chen-Yu Tsai <wens@csie.org>

Fixed the typo and applied, thanks
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] drm/sun4i: Fix macros in sun8i_csc.h
@ 2021-09-01  9:44     ` Maxime Ripard
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2021-09-01  9:44 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel, stable,
	Roman Stratiienko


[-- Attachment #1.1: Type: text/plain, Size: 1069 bytes --]

On Wed, Sep 01, 2021 at 11:13:01AM +0800, Chen-Yu Tsai wrote:
> On Wed, Sep 1, 2021 at 2:48 AM Jernej Skrabec <jernej.skrabec@gmail.com> wrote:
> >
> > Macros SUN8I_CSC_CTRL() and SUN8I_CSC_COEFF() don't follow usual
> > recommendation of having arguments enclosed in parenthesis. While that
> > didn't change anything for quiet sometime, it actually become important
> 
>                              ^ Typo
> 
> > after CSC code rework with commit ea067aee45a8 ("drm/sun4i: de2/de3:
> > Remove redundant CSC matrices").
> >
> > Without this fix, colours are completely off for supported YVU formats
> > on SoCs with DE2 (A64, H3, R40, etc.).
> >
> > Fix the issue by enclosing macro arguments in parenthesis.
> >
> > Cc: stable@vger.kernel.org # 5.12+
> > Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library")
> > Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> 
> Otherwise,
> 
> Reviewed-by: Chen-Yu Tsai <wens@csie.org>

Fixed the typo and applied, thanks
Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2021-09-01 11:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 18:48 [PATCH] drm/sun4i: Fix macros in sun8i_csc.h Jernej Skrabec
2021-08-31 18:48 ` Jernej Skrabec
2021-09-01  3:13 ` Chen-Yu Tsai
2021-09-01  3:13   ` Chen-Yu Tsai
2021-09-01  3:13   ` Chen-Yu Tsai
2021-09-01  9:44   ` Maxime Ripard
2021-09-01  9:44     ` Maxime Ripard

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.