From patchwork Tue Oct 17 08:07:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10011089 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 8D03E600CC for ; Tue, 17 Oct 2017 08:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E484287C8 for ; Tue, 17 Oct 2017 08:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72550287CF; Tue, 17 Oct 2017 08:08:00 +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 1A10C287C8 for ; Tue, 17 Oct 2017 08:08:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8AB96E60F; Tue, 17 Oct 2017 08:07:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x230.google.com (mail-wr0-x230.google.com [IPv6:2a00:1450:400c:c0c::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7DEA06E603 for ; Tue, 17 Oct 2017 08:07:53 +0000 (UTC) Received: by mail-wr0-x230.google.com with SMTP id l1so706024wrc.3 for ; Tue, 17 Oct 2017 01:07:53 -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; bh=Y4UMFHNqUU84fgjvYrcNUgSsF7eKz5+oxkPFiOcWD/A=; b=DXbEHBr3+F+qtehmTBZ0OQGrNQiB/3AJNe0Tvlo1umAEhHg6aAK7W+2FiJ8GY/cP+P sPH2usVcvNS+X5rtS9LjZEaU3ESWKg34OHn/goL/r+O+QnyRDQKrxg55/okXczfmOTIZ fEb8eL2+aRVY7KEcfTqkNRd9JGJM4wVhnFybzS9IIywrlZWmPKTB4ehAFDA34+MJ1hCo DahIffh/xMme0fwnf7EwySNVNbxi9CZifsxjgkwb0qAdDNzvMMn/zSdlzOSxGXL47VwD GpIX5UVUyx7cCKWn5AdZe7i3oFg7tjujWacsWlvtCMTwI3QgVMKyYIIjFLOq50r2OoSW j/3A== 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; bh=Y4UMFHNqUU84fgjvYrcNUgSsF7eKz5+oxkPFiOcWD/A=; b=U+lt4QK6SfEggMjOSRpvdgeIXkgat9AmoIRnWKUvcvP1uvwsBUBylKuzaiG3zKVBgf Tc5HEhK88gVDW56VSCkjFK14a/NH8HGne52hyf+jjrwcQ8QIT3VS3YLDUIX1uG2QAPEY BNgcyRw3OywH1pZaIQE9TxqCxDf1F4LwIXPNplXO/BTMviLHsAiOy2xG/M7HJ+H6CmPb tppAKIvx8ElXmMWsGvNVp12WIQuJaLyAZR8jhhtQbzKtA5U0lqKrLnPm8N4Kg7kWdCEU tD558KDfeW4x6u8NcQQAvazrU+Lq3cOvS7UMktWIXE1tn4kwya+ORZioehjcqasgUDAg 7XrA== X-Gm-Message-State: AMCzsaUHsWMn+Gp0yWN6tqsmKKalvRYOZz0HRRVn5tXbMsqFRCJ3noRU ih6sbw6kvzuBSnaa+2UW9P7Qug== X-Google-Smtp-Source: ABhQp+SjPvFxcCGYTpevXATBw7Omca22Ofynq5AnPXVCyuF8SjFUDegcQ6Z8jFx02toBgl8tKT13Mw== X-Received: by 10.223.130.194 with SMTP id 60mr3044175wrc.168.1508227672086; Tue, 17 Oct 2017 01:07:52 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 188sm7798687wmg.45.2017.10.17.01.07.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Oct 2017 01:07:51 -0700 (PDT) From: Neil Armstrong To: airlied@linux.ie Subject: [PATCH 4/4] drm/meson: Add missing VPU init Date: Tue, 17 Oct 2017 10:07:44 +0200 Message-Id: <1508227664-11171-5-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508227664-11171-1-git-send-email-narmstrong@baylibre.com> References: <1508227664-11171-1-git-send-email-narmstrong@baylibre.com> 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 --- 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 7742c7d..19a0d8d 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -150,6 +150,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); @@ -221,6 +229,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