Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/meson: fix G12A primary plane disabling

The G12A Primary plane was disabled by writing in the OSD1 configuration
registers, but this caused the plane blender to stall instead of continuing
to blend only the overlay plane.

Fix this by disabling the OSD1 plane in the blender registers, and also
enabling it back using the same register.

Fixes: 490f50c109d1 ("drm/meson: Add G12A support for OSD1 Plane")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
[narmstrong: fixed nit in commit log]
Link: https://patchwork.freedesktop.org/patch/msgid/20190605141253.24165-3-narmstrong@baylibre.com

+5 -4
+2
drivers/gpu/drm/meson/meson_crtc.c
··· 252 252 writel_relaxed(priv->viu.osb_blend1_size, 253 253 priv->io_base + 254 254 _REG(VIU_OSD_BLEND_BLEND1_SIZE)); 255 + writel_bits_relaxed(3 << 8, 3 << 8, 256 + priv->io_base + _REG(OSD1_BLEND_SRC_CTRL)); 255 257 } 256 258 257 259 static void meson_crtc_enable_vd1(struct meson_drm *priv)
+2 -2
drivers/gpu/drm/meson/meson_plane.c
··· 318 318 319 319 /* Disable OSD1 */ 320 320 if (meson_vpu_is_compatible(priv, "amlogic,meson-g12a-vpu")) 321 - writel_bits_relaxed(BIT(0) | BIT(21), 0, 322 - priv->io_base + _REG(VIU_OSD1_CTRL_STAT)); 321 + writel_bits_relaxed(3 << 8, 0, 322 + priv->io_base + _REG(OSD1_BLEND_SRC_CTRL)); 323 323 else 324 324 writel_bits_relaxed(VPP_OSD1_POSTBLEND, 0, 325 325 priv->io_base + _REG(VPP_MISC));
+1 -2
drivers/gpu/drm/meson/meson_viu.c
··· 405 405 0 << 16 | 406 406 1, 407 407 priv->io_base + _REG(VIU_OSD_BLEND_CTRL)); 408 - writel_relaxed(3 << 8 | 409 - 1 << 20, 408 + writel_relaxed(1 << 20, 410 409 priv->io_base + _REG(OSD1_BLEND_SRC_CTRL)); 411 410 writel_relaxed(1 << 20, 412 411 priv->io_base + _REG(OSD2_BLEND_SRC_CTRL));