Skip to contentSkip to conversation

drm/meson: fix 1px pink line on GXM when scaling video overlay

PATCH Superseded Christian Hewitt 1 participant 1 message Mar 3, 2023

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/meson: fix 1px pink line on GXM when scaling video overlay

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 registers with the downstream vendor driver revealed some differences:

- The vendor driver sets BIT(17) | BIT(13) for VPP_DOLBY_CTRL
- The vendor driver sets VPP_DUMMY_DATA

Setting those values prevents the 1px pink line from being seen.

Fixes bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller")
---
 drivers/gpu/drm/meson/meson_registers.h | 2 +-
 drivers/gpu/drm/meson/meson_vpp.c       | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/meson/meson_registers.h +1 -1
index 0f3cafab8860..e4af333fd839 100644
@@ -534,7 +534,7 @@
 #define VPP_PEAKING_VGAIN 0x1d92
 #define VPP_PEAKING_NLP_1 0x1d93
 #define VPP_DOLBY_CTRL 0x1d93
-#define VPP_PPS_DUMMY_DATA_MODE (1 << 17)
+#define VPP_PPS_DUMMY_DATA_MODE (1 << 17 | 1 << 13)
 #define VPP_PEAKING_NLP_2 0x1d94
 #define VPP_PEAKING_NLP_3 0x1d95
 #define VPP_PEAKING_NLP_4 0x1d96
drivers/gpu/drm/meson/meson_vpp.c +2 -0
index 154837688ab0..5df1957c8e41 100644
@@ -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));
 
Signature · 1 line
2.34.1