From patchwork Mon Mar 25 14:18:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10869329 X-Patchwork-Delegate: neil.armstrong@linaro.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D33671575 for ; Mon, 25 Mar 2019 14:18:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB67228FFE for ; Mon, 25 Mar 2019 14:18:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFA5629025; Mon, 25 Mar 2019 14:18:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C8B5128FFE for ; Mon, 25 Mar 2019 14:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d2q0dtU7QDL/VRKnn66bIF/EVDeFHbPNj8GAluNcxzQ=; b=ba+CgabQH/Eezz Y0K75IFMZrUwWlPOxULXwdG7JwNRY1inx7j7TxYjp9Kv6UK+Kq3RQvoOrrSgUEAdM+CxjLZH4xMMZ aybzwBYqxg4ez8nKWNgAgUJ1Wz+b4tLflvF19iXFGAXpFiMx/vkMTWobMSNfyujY3f0x6VdLyui0X 6e6EPWW7gll5SrXW48Jr1yl4M+YB9f512A2VKZMtmHGZPLbDI9Nl550BjfXewhgJIXXkkgJa9Qyt0 xJpvdSeVTRef11KqCYNMSAjlc5KP3Dn/sgNap9RGMXzGUsoszC5QiUp8XR/G2L0rzI/VEC93uAFiW 2b8KT/ECFbcP58TvRxIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8QR6-0007nr-Hh; Mon, 25 Mar 2019 14:18:48 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8QQv-0007gI-Qv for linux-amlogic@lists.infradead.org; Mon, 25 Mar 2019 14:18:42 +0000 Received: by mail-wm1-x342.google.com with SMTP id z11so9194149wmi.0 for ; Mon, 25 Mar 2019 07:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9NjvvI6xxrMvbgreZkI/znNtsX+wD5ky2vWfW/YYRc4=; b=r5HIdwckPHedjpTgqQ/mk55L3fBP8SbOrjd+A/cfm+BK4jT7uX3yUGFY+g713wzBuU 62ZwbLnQ8knAxGrfa9hFMrQa8qQO/FP8Cdn4Tzkd6PG8eLQ7oZ/RTKb7Te+AOVxxKz6B 0EcTNB30UgPqQQacQ1NLoed/ijDJUnlLxAQSoLvsQ0iqai/dSXwLom794jjSwX8PE24P 6hod2cQQ+IVlNcPUlK4+o60ewaxUYtF5X2nilbv3Cvfi3tyc0YH/oA1mNfhF1P50slDa 9RES3t39mTlVCnP7ZEGvbnKU44A6czHASOfpjRhT3xN8u/KwzcMjt5kr1aJ8BU3diItx I6XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9NjvvI6xxrMvbgreZkI/znNtsX+wD5ky2vWfW/YYRc4=; b=L+CZhLdWr+0MldcH44oKJXg4RytuVqeZEuiLwDezUMQQTBhPsaQtikyUGhfLvVLmCp FwsTRTCmiiyqJ8+dAPgnOZxXqEagHX1odZuk8WwcVwXV5j4QM9fSINJM22cOvNe5YZtC 2pBkf+hKf+O5QjTgjtUprk0wNjUzGHv5wB9116dEr28dBawX/ZX0v4UWvj/iQn4vLAd5 SM2KBqZC4D2V+yKWJYXcjtduIcm2UwCTXdQu7mFHM0QhqKKCMy86pfR3zbBvpO8tATyD 4hIEA9nwasCUhmVkGzaijQ3TdBCJ6fSmnwrIdlSie345EaRmFk9JNFwPg1K4NwZeZGHm na6w== X-Gm-Message-State: APjAAAXxWWflcbJYunfXvnnbr6I9x+XE0FGRlBvn/JsT3BB+B1TENCDe BmffNlj+ZJh3tqhdHOi+QfbrmhzQby94Qg== X-Google-Smtp-Source: APXvYqycLSLO6xaeAbRCJdfz7W+lVg6wVYIQTncbJK27nigm5eGkdADSWULi+QLlHfecFQ0lEwasdg== X-Received: by 2002:a1c:6a0d:: with SMTP id f13mr11386367wmc.76.1553523515408; Mon, 25 Mar 2019 07:18:35 -0700 (PDT) Received: from localhost.localdomain (176-150-251-154.abo.bbox.fr. [176.150.251.154]) by smtp.gmail.com with ESMTPSA id 132sm26976794wmd.30.2019.03.25.07.18.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Mar 2019 07:18:33 -0700 (PDT) From: Neil Armstrong To: dri-devel@lists.freedesktop.org Subject: [PATCH 06/11] drm/meson: Add G12A Support for the Overlay video plane Date: Mon, 25 Mar 2019 15:18:19 +0100 Message-Id: <20190325141824.21259-7-narmstrong@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190325141824.21259-1-narmstrong@baylibre.com> References: <20190325141824.21259-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_071837_867415_39CFEB00 X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 VD11 setup registers, except using the new blender register to disable the plane. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_overlay.c | 10 ++++++++-- 1 file 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)); }