From patchwork Wed Dec 6 11:54:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10095691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E1CA060329 for ; Wed, 6 Dec 2017 11:54:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3FCE29BA9 for ; Wed, 6 Dec 2017 11:54:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C790829BAE; Wed, 6 Dec 2017 11:54:42 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B2A929BA9 for ; Wed, 6 Dec 2017 11:54:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 180BC6E0B5; Wed, 6 Dec 2017 11:54:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id C30116E0B5 for ; Wed, 6 Dec 2017 11:54:39 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id f9so6686601wmh.0 for ; Wed, 06 Dec 2017 03:54:39 -0800 (PST) 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:o; bh=SzYnXWbyY18DemN0CVODqoNGn97juN2hYK2e5xX3ki4=; b=jUFOEwLbMa5DkpJt2lU4gjeAuhNY+EdaH7HiYEA7iza6XpkBi50cqSNmcjJkuro9+a KpTb/pEu3iBxiQayA5R+Ss2hV23l6gK3keKSPyjgn/OkLm4YugYyg79951oifmwpTqt/ XJS++94HOGJ3BHr5Z1UEP97WMCvdFgO3t5YqGSbUbTUL7qRBDBSTX38pa5hBXPvvcHRw JWJHxE0nklyWyg4q/dQ+hMiTUv9FtYSwGiQSmXziZhSJWQ9FYnibBhptcRHfbjaocSRT ea+BQLaqax2ovtPYcWn1iMcsNihVdryOrDzMqTNk+pAckNSDPHjVUe7eMtNkMEndu1/A aGYA== 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:o; bh=SzYnXWbyY18DemN0CVODqoNGn97juN2hYK2e5xX3ki4=; b=CicvGtK5glMIFt0irofueNh+FUL1byIZyxZbSoKQwVF69Yl/TT7ktO0Orm1dC8KPUR JxGerhOIArX0o54okYQcQhKxdmz3lhGxyNuoJ46e7CBY4aBPA96dqRq+fXf7ZPhSbEdy VtJZv2CESp3geKu/Nz8Jsi+SNTrAflZJO+sYd5qjoJUAe6OeSFwjzhGbYW7C8Y7rDLQJ J4Nraurmkovd1SiIeMhxnFO+zDBTo5IzJUxRNKPAHrsB8hYriAkyl/Fvt8YNXFoKSalM fPKjGZs6y5MvgMrB4GpK1+qrr0v8hbg7PDr2Z8WzscZwd1xgHK4+MOzAsuEx3+clRZYv PH0Q== X-Gm-Message-State: AKGB3mJ/3cjoXjYbn4dOVBgvYF6zAsbpyhy4luaTmgTZEce1cfA1U5oN Jz9PYYRY6ND8gYbQySINtUcyBajiV1A= X-Google-Smtp-Source: AGs4zMaNd6e796l/wJDS1eqUyJ2b3Wf7NibCjjK2rJiiZCfBmqY+o0T9BEtNPW/+16q+V9Yxq+WpTQ== X-Received: by 10.28.145.141 with SMTP id t135mr9214833wmd.107.1512561278346; Wed, 06 Dec 2017 03:54:38 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:2e4f:a3d0:31c2:ed55:b111:7ef8]) by smtp.gmail.com with ESMTPSA id k11sm2931875wmi.18.2017.12.06.03.54.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 03:54:37 -0800 (PST) From: Neil Armstrong To: Subject: [RESEND PATCH 4/4] drm/meson: Add missing VPU init Date: Wed, 6 Dec 2017 12:54:28 +0100 Message-Id: <1512561268-29806-5-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512561268-29806-1-git-send-email-narmstrong@baylibre.com> References: <1512561268-29806-1-git-send-email-narmstrong@baylibre.com> o: airlied@linux.ie Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Neil Armstrong X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The VPU init misses these configurations values. Signed-off-by: Neil Armstrong Acked-by: Chris Wilson --- drivers/gpu/drm/meson/meson_drv.c | 9 +++++++++ drivers/gpu/drm/meson/meson_registers.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 3b804fd..f9ad0e9 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -151,6 +151,14 @@ static struct regmap_config meson_regmap_config = { .max_register = 0x1000, }; +static void meson_vpu_init(struct meson_drm *priv) +{ + writel_relaxed(0x210000, priv->io_base + _REG(VPU_RDARB_MODE_L1C1)); + writel_relaxed(0x10000, priv->io_base + _REG(VPU_RDARB_MODE_L1C2)); + writel_relaxed(0x900000, priv->io_base + _REG(VPU_RDARB_MODE_L2C1)); + writel_relaxed(0x20000, priv->io_base + _REG(VPU_WRARB_MODE_L2C1)); +} + static int meson_drv_bind_master(struct device *dev, bool has_components) { struct platform_device *pdev = to_platform_device(dev); @@ -222,6 +230,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) /* Hardware Initialization */ + meson_vpu_init(priv); meson_venc_init(priv); meson_vpp_init(priv); meson_viu_init(priv); diff --git a/drivers/gpu/drm/meson/meson_registers.h b/drivers/gpu/drm/meson/meson_registers.h index 2847381..bca8714 100644 --- a/drivers/gpu/drm/meson/meson_registers.h +++ b/drivers/gpu/drm/meson/meson_registers.h @@ -1363,6 +1363,10 @@ #define VPU_PROT3_STAT_1 0x277a #define VPU_PROT3_STAT_2 0x277b #define VPU_PROT3_REQ_ONOFF 0x277c +#define VPU_RDARB_MODE_L1C1 0x2790 +#define VPU_RDARB_MODE_L1C2 0x2799 +#define VPU_RDARB_MODE_L2C1 0x279d +#define VPU_WRARB_MODE_L2C1 0x27a2 /* osd super scale */ #define OSDSR_HV_SIZEIN 0x3130