]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: Fix macros in sun8i_csc.h
authorJernej Skrabec <jernej.skrabec@gmail.com>
Tue, 31 Aug 2021 18:48:19 +0000 (20:48 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 1 Sep 2021 09:44:10 +0000 (11:44 +0200)
commit24cbc8d5ec9a776208b902ae47375dc51dc1d9c6
treef2d9444fd03fe221aabcedf4aefaf3d82e47857b
parentb1ad54a8473f58b812e0a3028ca250fc62e6b74e
drm/sun4i: Fix macros in sun8i_csc.h

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 quite sometime, it actually become important
after CSC code rework with commit 845061a417ef ("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: 6450d6c4490d ("drm/sun4i: Add DE2 CSC library")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210831184819.93670-1-jernej.skrabec@gmail.com
drivers/gpu/drm/sun4i/sun8i_csc.h