summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/meson/meson_overlay.c
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2019-03-25 15:18:19 +0100
committerNeil Armstrong <narmstrong@baylibre.com>2019-04-09 11:25:42 +0200
commit11c2d4c751e5b339f8a3c6b9f19120bb331af0ef (patch)
tree6558cd1b3c99c63a070cb5350823d03918d58ba2 /drivers/gpu/drm/meson/meson_overlay.c
parentdrm/meson: Add G12A support for OSD1 Plane (diff)
downloadlinux-11c2d4c751e5b339f8a3c6b9f19120bb331af0ef.tar.xz
linux-11c2d4c751e5b339f8a3c6b9f19120bb331af0ef.zip
drm/meson: Add G12A Support for the Overlay video plane
Amlogic G12A SoC supports the same set of Video Planes, but now are handled by the new OSD plane blender module. This patch uses the same VD1 plane for G12A, using the exact same scaler and VD1 setup registers, except using the new blender register to disable the plane. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: fix typo in commit log] Tested-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190325141824.21259-7-narmstrong@baylibre.com
Diffstat (limited to 'drivers/gpu/drm/meson/meson_overlay.c')
-rw-r--r--drivers/gpu/drm/meson/meson_overlay.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c
index b54a22e483b9..bdbf925ff3e8 100644
--- a/drivers/gpu/drm/meson/meson_overlay.c
+++ b/drivers/gpu/drm/meson/meson_overlay.c
@@ -516,8 +516,14 @@ static void meson_overlay_atomic_disable(struct drm_plane *plane,
priv->viu.vd1_enabled = false;
/* Disable VD1 */
- writel_bits_relaxed(VPP_VD1_POSTBLEND | VPP_VD1_PREBLEND, 0,
- priv->io_base + _REG(VPP_MISC));
+ if (meson_vpu_is_compatible(priv, "amlogic,meson-g12a-vpu")) {
+ writel_relaxed(0, priv->io_base + _REG(VD1_BLEND_SRC_CTRL));
+ writel_relaxed(0, priv->io_base + _REG(VD2_BLEND_SRC_CTRL));
+ writel_relaxed(0, priv->io_base + _REG(VD1_IF0_GEN_REG + 0x17b0));
+ writel_relaxed(0, priv->io_base + _REG(VD2_IF0_GEN_REG + 0x17b0));
+ } else
+ writel_bits_relaxed(VPP_VD1_POSTBLEND | VPP_VD1_PREBLEND, 0,
+ priv->io_base + _REG(VPP_MISC));
}