Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2893369ybb; Mon, 30 Mar 2020 15:26:11 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs5m3IBYdyM4j66MYSHpDuv4hefpbD5DeCAsvoP1BN8HxsnDFg6xGp5cedqKotIEWVSaDS6 X-Received: by 2002:a05:6830:19e2:: with SMTP id t2mr10113472ott.97.1585607171108; Mon, 30 Mar 2020 15:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585607171; cv=none; d=google.com; s=arc-20160816; b=wK2JO7IAbi3+DPhAqYd/3AASF67/6QskWQHKOimKT6XN62qJSSNSxcCAsfUJxyVAwA NGE4ekV2Ck/QVP+Uw9i3luoG5oZj8gdUxWaTpnaSm7J1+zcFpLKg0G7nfFInH0/6rWGZ 74e7f3ND/GfhJW2tL7Hd8d39tXUYdfc/QtB/cKC2GR11XNdI0rKVsMqRnSrSL/9ea3Ay p+SGZobA5XQcBB97rqVllT07VICw7X54XeP3VbPu7n5rKc7rZd/gdMHw5d9sG5eJSdNY spca/Q/DZp3WCW+6GhU80mUrDAulKZ8/qTIEyXvd2VxBX0yG7IFSD5bdtClfVtPaIpSI Dhag== 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=2VkoQedczWLBus6tX3n5y4wQRH1ftctG/cF/BNNp5TE=; b=QocMqncvWL8YBhYsM0UjMHs2XEZpS89INsCjeF6z4hYJXCeH6OyxT6qxuSsNTKICm6 lEUglxRYa2v9ehQK8jCeb9gY6+wwekGRsT7TCsSmy06zEbQFzjMU3pRKlhE+AuuwC5A1 QOuzsjbm7GT2poUrnaJBAOg0+MYj/DPnqVWAOstHOGPeRy+sUx8ZRfw6nLXxm4NngBB0 /BQq/TDhhBRLCsyGJXQlbRibL2rsR++I5QMYK7LLLNhYrSGEZTSz+QwclKxSfEEU265s 6qZM3kHnQ0s+zKHeMFaWA6AOtIxPK+y1BWH6jAOsi63QiieRfW+OKuJ8I5dxDWYHuNPc t58Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="rLucE9/R"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p2si6438045otk.220.2020.03.30.15.25.58; Mon, 30 Mar 2020 15:26:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="rLucE9/R"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730961AbgC3WLa (ORCPT + 99 others); Mon, 30 Mar 2020 18:11:30 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39013 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728987AbgC3WLa (ORCPT ); Mon, 30 Mar 2020 18:11:30 -0400 Received: by mail-wr1-f65.google.com with SMTP id p10so23591752wrt.6; Mon, 30 Mar 2020 15:11:29 -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=2VkoQedczWLBus6tX3n5y4wQRH1ftctG/cF/BNNp5TE=; b=rLucE9/RYbxcQsiwyj8s+DMFOnyqScGjogDDQTt/ysPfoWFsvldH4Eb5BFVYuF1K3Y Nb0YBeTl4mWGVBP84wku6pbJvTZvSP/br/lx95SLIIWji2b83He3DMHuRnNgM3tmVQgj gQBj9BhZyYl9DONJppZ/Cqa71rjlTqM612S3YnpPtokD32kmU7J79ZvVjoHyuuRFZtj0 c9YVfGzaNMJ0GjNRwAuIsl5RKkfxf4Jc9I42GUpAMvpoDT1RxHhHWb32MdREz/TO2i6s i7OJVW5mfJWPrWY3l8xLtUjpDMFMx0q0GV1rzN5I+gztT1PCQ0hPwl1zAG2LfXwX0rG2 ymZQ== 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=2VkoQedczWLBus6tX3n5y4wQRH1ftctG/cF/BNNp5TE=; b=OwAHSfOEFQWNOwwHeY23WTan3MjcJcAIlar1kQW5TmGjsHEFVtemVl2hgUtJwz2S5M JZlCtHLlkVsaNOjnQCnQhPYJWrTe/7wY+ixESDUlWGQF3pUtXhMCTRCLOsUopNMHQ7Wz oIIzXRca6Y4hB/nnarR0VPqGlvmzxrDw2QM6GmkLGjZ3k1xIkkRwdA6aMhD33HcnJMSA GyVVz76LLbKpe05S9DrKfuGTm4dJgGFEgqSUMNfrR8xQVjWk+b9mUey/DIZ5K4RlTPOu zE2SBx1vfAGWCYrpADUmGJevGLh4GEqbxxtaoavcnqnn+SgO0fydktbbxgBEKjr2wB2n B9Ig== X-Gm-Message-State: ANhLgQ02OU2YPmzcrsKELBphFSDXOmOBkZbrY27NEYwmr1DBcRzf+DOJ ikWbAkqwL+2e35stHfmxKX40+KiF X-Received: by 2002:a5d:4401:: with SMTP id z1mr16739067wrq.259.1585606288271; Mon, 30 Mar 2020 15:11:28 -0700 (PDT) Received: from localhost.localdomain (p200300F13710ED00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3710:ed00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b187sm1260509wmc.14.2020.03.30.15.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 15:11:27 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, jbrunet@baylibre.com, narmstrong@baylibre.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Martin Blumenstingl Subject: [RFC v1 0/5] GPU DVFS for Meson GXBB/GXL/GXM/G12A/G12B/SM1 Date: Tue, 31 Mar 2020 00:10:59 +0200 Message-Id: <20200330221104.3163788-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.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] (queued for Linux 5.7) and panfrost we can make it work on Amlogic SoCs. The first two patches update the clock drivers to allow runtime frequency changes of the mali clock tree. This is similar to what I have implemented for Meson8b/Meson8m2 already. The remaining three patches add the GPU OPP tables to the .dtsi files. 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 #3. Patches #4 (GXM) and #5 (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. [0] https://cgit.freedesktop.org/drm-misc/commit/?id=1996970773a323533e1cc1b6b97f00a95d675f32 Martin Blumenstingl (5): clk: meson: gxbb: Prepare the GPU clock tree to change at runtime clk: meson: g12a: Prepare the GPU clock tree to change at runtime 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 +++----------- arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 45 +++++++++----- drivers/clk/meson/g12a.c | 30 ++++++--- drivers/clk/meson/gxbb.c | 40 ++++++------ 7 files changed, 189 insertions(+), 133 deletions(-) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gx-mali450.dtsi -- 2.26.0