Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1170120ybh; Sun, 19 Jul 2020 10:41:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyN194Wo4sO42JcNdC7W2A8ZAcExIHT9clkguKzYptguxHMXg++k9ptInsKyZejrkQub9O X-Received: by 2002:a17:906:27c9:: with SMTP id k9mr17058571ejc.74.1595180473235; Sun, 19 Jul 2020 10:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595180473; cv=none; d=google.com; s=arc-20160816; b=ssnQTECD+YGwMZXt89GRe35IeijGMl3iJCJguv/h1dNBzt5F0mIcFIFld5YDBQ6/0X n/2XJN9E8vLC3Il9m/5muYkDdABA79YEHlflGAaXyCs39BpLWE8aNPHl1gpCqgx0kSQ3 SZ5L9gCK8Mwk5/QY2nul/7E42yk/45H6IJi0nCAFjCP7MNK3auFMyuSZC9gDOBN7boVs MoV9xhNd21GxSIpIWRCu9fm9eVZx6CB1F5HdxMX/pRjgXygjGAKN4+tC8c87zGOQYMKW QjdMXfU+4IOA1m6DVc21NLhjY58MiJADEMH5GN4nFK+WJHDvrpanymzpB0vvg7n5/YDk /SKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9mR0eGFh9MH9sNZOZh0ch4XwokpANORC/EtJxy7S/4c=; b=FBUfOVwyGBeZoXiZd/uYin7cGkwelQXn27zXsnxGqS7SFzpsizvlrIjkdEO0IjMTcW Ss65zw2ltQlhy9w4HFskEoAtMSqKtMPyY/XfFEwOKdA4PZNgXGGq0e39VysElD3nNxvy L/3gkvHlYtxoTqG1Nn4Y5dVWRLw+O5g9P7fvMZUN2t53KFVjas1Pbsl5jOfAo5gxIsW5 ziJ/hvDg8EShaL5i7xUT3xkxWau9CZSm7e1Oi3iL+h7cJsqSHlnjA4xcCo1J1Qs3xJxm bYkJHRr1jFcAGFGA7NdzMSoMVc6IKk39fWG43Dnl80ALnSLS1Qy+P/4aSui/yydsY9il MThQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=PqocFj0J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si9747645eje.289.2020.07.19.10.40.50; Sun, 19 Jul 2020 10:41:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=PqocFj0J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726131AbgGSRhe (ORCPT + 99 others); Sun, 19 Jul 2020 13:37:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgGSRhe (ORCPT ); Sun, 19 Jul 2020 13:37:34 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B802CC0619D2 for ; Sun, 19 Jul 2020 10:37:33 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id w9so1670374ejc.8 for ; Sun, 19 Jul 2020 10:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9mR0eGFh9MH9sNZOZh0ch4XwokpANORC/EtJxy7S/4c=; b=PqocFj0Jsii8lhfLE+i9nkHhQxwb+4fvkmQpIk+6oQvM4O3P1R6HdSLNpjJ2S0vqmy ImMCCRT9lJxe6ZvaVRavb8zChQ48lbv52AN/5xEA7ZeDWl4psh9eNt+ILjvRy4SYfN/P VB9+wrEW9dck4RyXBIToou5kroxexoONJE25Esnmj9A+jYpgeZ8kkmp26VUup9m3S1mg AodQzZrEgo9hTSYVCYvcPpQdLOZJSiejtxpHpofvHVlSutLrX2TOeJii3XVXweAQboF+ Xw9K4SgsQH3jVPTqQkCZ2KKW7S9T9z9HHS3GZjbwiG6p14VToyv8ALRjIBIg2cFWHk+O +cLw== 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:mime-version :content-transfer-encoding; bh=9mR0eGFh9MH9sNZOZh0ch4XwokpANORC/EtJxy7S/4c=; b=DViSwu1EkuNDsRT8Ckpaisa3wWhgHDAf411jHWK0p3tBmQCN2sNbOM/E8NGgKPpXtD rw2jp1iA6tZuU2+P2aDS411ufQihTiOP8uHhq/Mvxfl4jDgrV7o8CsfNsdeRvFQlhs+S PfM0kD/eHzpdZAzMgQdxnvwHOVOkeKaJ5s/cU8XwYpIcMOuy/ksVmzvyen7JqafNwjZz 5bCoj9U9P/c0i5PFAEl75+92gC4y+8vKfS4/QuI9oN+PjKUxNkP0OwQovnOchtA36LOJ 9ucwhe7JUIoSt2SeXeMRsIppuuv8okLGVIpvn24fNHH0bxAVGlBiKd0C2hRWy87slpx6 v/Jg== X-Gm-Message-State: AOAM531LashyEW8ClzofcwqZomlJE7dNwQToyYT023q+2xy1K0OtLFGC S55wRPtVNj0pH8kw16getpo= X-Received: by 2002:a17:906:d057:: with SMTP id bo23mr17450701ejb.210.1595180252411; Sun, 19 Jul 2020 10:37:32 -0700 (PDT) Received: from localhost.localdomain (p200300f13716be00428d5cfffeb99db8.dip0.t-ipconnect.de. [2003:f1:3716:be00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id bc23sm13563208edb.90.2020.07.19.10.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2020 10:37:31 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, narmstrong@baylibre.com, Martin Blumenstingl Subject: [PATCH v2 0/3] GPU DVFS for Meson GXBB/GXL/GXM/G12A/G12B/SM1 Date: Sun, 19 Jul 2020 19:32:10 +0200 Message-Id: <20200719173213.639540-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have GPU DVFS support in lima [0] (in Linux 5.7) and panfrost we can make it work on Amlogic SoCs. I decided to remove code duplication for the Mali-450 GPU on GXBB and GXL so it will be easier to maintain this. This refactoring is part of patch #1. Patches #2 (GXM) and #3 (G12A, G12B, SM1) are straight forward; it replaces the hardcoded clock settings with the the GPU OPP table. I used the userspace devfreq governor to cycle through all available GPU frequency settings on GXL, GXM and G12A (which covers all relevant GPU driver and clock driver combinations). I have taken the GPU OPP tables from Amlogic's 4.9 vendor kernel and the voltage settings (opp-microvolt property) from the public dataseheets for all SoCs. Changes since v1 at [1]: - removed the clock patches from this series as they are already applied (in Linux 5.8) - rebased on top of Neil's recent patch "arm64: dts: meson-gxl-s805x: reduce initial Mali450 core frequency" - adapted patch #1 after Neil's GXL S805X patch to keep the 744MHz OPP disabled on that package - added a comment about GP0_PLL (as to why it's needed) to all patch descriptions - removed RFC prefix [0] https://cgit.freedesktop.org/drm-misc/commit/?id=1996970773a323533e1cc1b6b97f00a95d675f32 [1] https://patchwork.kernel.org/cover/11466399/ Martin Blumenstingl (3): arm64: dts: amlogic: meson-gx: add the Mali-450 OPP table and use DVFS arm64: dts: amlogic: meson-gxm: add the Mali OPP table and use DVFS arm64: dts: amlogic: meson-g12: add the Mali OPP table and use DVFS .../boot/dts/amlogic/meson-g12-common.dtsi | 49 ++++++++++----- .../boot/dts/amlogic/meson-gx-mali450.dtsi | 61 +++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 51 ++++------------ .../boot/dts/amlogic/meson-gxl-mali.dtsi | 46 +++----------- .../boot/dts/amlogic/meson-gxl-s805x.dtsi | 17 +++--- arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 45 +++++++++----- 6 files changed, 153 insertions(+), 116 deletions(-) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gx-mali450.dtsi -- 2.27.0