Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/meson: fix 1px pink line on GXM when scaling video overlay
@ 2023-03-03 12:33 Christian Hewitt
  2023-03-04 21:44 ` Martin Blumenstingl
  2023-03-06  8:43 ` Neil Armstrong
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Hewitt @ 2023-03-03 12:33 UTC (permalink / raw)
  To: Neil Armstrong, David Airlie, Daniel Vetter, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl, dri-devel, linux-amlogic,
	linux-arm-kernel, linux-kernel

Playing media with a resolution smaller than the crtc size requires the
video overlay to be scaled for output and GXM boards display a 1px pink
line on the bottom of the scaled overlay. Comparing with the downstream
vendor driver revealed VPP_DUMMY_DATA not being set [0].

Setting VPP_DUMMY_DATA prevents the 1px pink line from being seen.

[0] https://github.com/endlessm/linux-s905x/blob/master/drivers/amlogic/amports/video.c#L7869

Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller")
Suggested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
Change since v1:
This time I sent the right patch from the correct branch; the wording in
v1 is incorrect and the change to meson_registers.h is not required.

 drivers/gpu/drm/meson/meson_vpp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/meson/meson_vpp.c b/drivers/gpu/drm/meson/meson_vpp.c
index 154837688ab0..5df1957c8e41 100644
--- a/drivers/gpu/drm/meson/meson_vpp.c
+++ b/drivers/gpu/drm/meson/meson_vpp.c
@@ -100,6 +100,8 @@ void meson_vpp_init(struct meson_drm *priv)
 			       priv->io_base + _REG(VPP_DOLBY_CTRL));
 		writel_relaxed(0x1020080,
 				priv->io_base + _REG(VPP_DUMMY_DATA1));
+		writel_relaxed(0x42020,
+				priv->io_base + _REG(VPP_DUMMY_DATA));
 	} else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A))
 		writel_relaxed(0xf, priv->io_base + _REG(DOLBY_PATH_CTRL));
 
-- 
2.34.1


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

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

* Re: [PATCH v2] drm/meson: fix 1px pink line on GXM when scaling video overlay
  2023-03-03 12:33 [PATCH v2] drm/meson: fix 1px pink line on GXM when scaling video overlay Christian Hewitt
@ 2023-03-04 21:44 ` Martin Blumenstingl
  2023-03-06  8:43 ` Neil Armstrong
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2023-03-04 21:44 UTC (permalink / raw)
  To: Christian Hewitt
  Cc: Neil Armstrong, David Airlie, Daniel Vetter, Kevin Hilman,
	Jerome Brunet, dri-devel, linux-amlogic, linux-arm-kernel,
	linux-kernel

On Fri, Mar 3, 2023 at 1:33 PM Christian Hewitt
<christianshewitt@gmail.com> wrote:
>
> Playing media with a resolution smaller than the crtc size requires the
> video overlay to be scaled for output and GXM boards display a 1px pink
> line on the bottom of the scaled overlay. Comparing with the downstream
> vendor driver revealed VPP_DUMMY_DATA not being set [0].
>
> Setting VPP_DUMMY_DATA prevents the 1px pink line from being seen.
>
> [0] https://github.com/endlessm/linux-s905x/blob/master/drivers/amlogic/amports/video.c#L7869
>
> Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller")
> Suggested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

> ---
> Change since v1:
> This time I sent the right patch from the correct branch; the wording in
> v1 is incorrect and the change to meson_registers.h is not required.
Thanks Christian - I was about to ask whether you could isolate which
part of the original patch fixes the issue, but you've been quicker
:-)

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

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

* Re: [PATCH v2] drm/meson: fix 1px pink line on GXM when scaling video overlay
  2023-03-03 12:33 [PATCH v2] drm/meson: fix 1px pink line on GXM when scaling video overlay Christian Hewitt
  2023-03-04 21:44 ` Martin Blumenstingl
@ 2023-03-06  8:43 ` Neil Armstrong
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2023-03-06  8:43 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, dri-devel, linux-amlogic, linux-arm-kernel,
	linux-kernel, Christian Hewitt

Hi,

On Fri, 03 Mar 2023 12:33:12 +0000, Christian Hewitt wrote:
> Playing media with a resolution smaller than the crtc size requires the
> video overlay to be scaled for output and GXM boards display a 1px pink
> line on the bottom of the scaled overlay. Comparing with the downstream
> vendor driver revealed VPP_DUMMY_DATA not being set [0].
> 
> Setting VPP_DUMMY_DATA prevents the 1px pink line from being seen.
> 
> [...]

Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-fixes)

[1/1] drm/meson: fix 1px pink line on GXM when scaling video overlay
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=5c8cf1664f288098a971a1d1e65716a2b6a279e1

-- 
Neil


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

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

end of thread, other threads:[~2023-03-06  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03 12:33 [PATCH v2] drm/meson: fix 1px pink line on GXM when scaling video overlay Christian Hewitt
2023-03-04 21:44 ` Martin Blumenstingl
2023-03-06  8:43 ` Neil Armstrong

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