drm/sun4i: frontend: Reuse the ch0 phase for RGB formats
authorMaxime Ripard <maxime@cerno.tech>
Thu, 15 Oct 2020 09:36:41 +0000 (11:36 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 26 Oct 2020 10:43:30 +0000 (11:43 +0100)
commit2db9ef9d9e6ea89a9feb5338f58d1f8f83875577
tree13b5cb3f8f242d63edcca73f4e918bc0ec0e7e21
parent84c971b356379c621df595bd00c3114579dfa59f
drm/sun4i: frontend: Reuse the ch0 phase for RGB formats

When using the scaler on the A10-like frontend with single-planar formats,
the current code will setup the channel 0 filter (used for the R or Y
component) with a different phase parameter than the channel 1 filter (used
for the G/B or U/V components).

This creates a bleed out that keeps repeating on of the last line of the
RGB plane across the rest of the display. The Allwinner BSP either applies
the same phase parameter over both channels or use a separate one, the
condition being whether the input format is YUV420 or not.

Since YUV420 is both subsampled and multi-planar, and since YUYV is
subsampled but single-planar, we can rule out the subsampling and assume
that the condition is actually whether the format is single or
multi-planar. And it looks like applying the same phase parameter over both
channels for single-planar formats fixes our issue, while we keep the
multi-planar formats working properly.

Reported-by: Taras Galchenko <tpgalchenko@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20201015093642.261440-2-maxime@cerno.tech
drivers/gpu/drm/sun4i/sun4i_frontend.c