Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2621597pxb; Sun, 17 Oct 2021 20:45:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRVw3YURV8RSNvJfb74y1d/uSVAhsC1Nzf+Q8Kk//Vtb79Zgxnpp4mZg7wJqydEccHEqzg X-Received: by 2002:a17:902:7001:b0:13d:d5b7:d06e with SMTP id y1-20020a170902700100b0013dd5b7d06emr25052791plk.61.1634528750511; Sun, 17 Oct 2021 20:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528750; cv=none; d=google.com; s=arc-20160816; b=ynBepAJn3efU33WOP1KAF9g7z1iqr0C9CRhejo+RzQmWXBL5C7vFPns1QDfU7lLdhv LrftjXwuR87rH7qxK0mYSOEKwrsEUdFpYciQuVvhCciKfN6j6YWHh+217sRhwx7V+D2/ XgnSgP5UH+rBShuyVVSpP8Cy5+x487HfZ+ibH09LCZ8m2+0R4v9q6ms5AFzzo+L7UFHN 0ZNj7f4pBp8RYUy9r/Op93EhS7FHjPaTdhqEHanenxsaeploDoa9ixdu3MXLycZAXk83 5C6zPBWi+UbTABJyu9/zMhNxJIr39eYNgnVxaCg+O1gDMDswGw3+sBcgiecalNfrqK/x JMrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aLWe12uJoW6Tr5t0/eOb90iUkYk4LWBq+lz5QePH0ZA=; b=bSrczHQUv3Pjnh5/OqFefRcrIfi8WrmPwAHQNV1e5hiPTal4KKsvBt+i4xNZ41ueH2 HQYeWMSfg1NXYRaJ1qLfbGPmAWa1NXDMijc9wuyoQFRfWl7way6c32Vp3sy8KzV664oO Ez68ttZAi+XQ9SejhIc2TRiSf2V0lhbuj0tDB7TdmgTob24kD34AYNVTxmKzVj51lVCW O+w8gcBLQtCgo72Lla1iJ+I/gX+7jVrAVq20MzBDkVNT+tg7uC58eKcrOdoe4DwDUDMh lsYGxg4EI+0FRE5IUFlVFqPJkTNNJc+RKkpPOJsJbqW66rAcj+dm5FH1G9PUCRkcDrA6 ijFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lW5kUj1L; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si3463309pgb.369.2021.10.17.20.45.38; Sun, 17 Oct 2021 20:45:50 -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=@gmail.com header.s=20210112 header.b=lW5kUj1L; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343960AbhJQPb4 (ORCPT + 98 others); Sun, 17 Oct 2021 11:31:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343951AbhJQPbz (ORCPT ); Sun, 17 Oct 2021 11:31:55 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3342C061769; Sun, 17 Oct 2021 08:29:45 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id l7so13259429qkk.0; Sun, 17 Oct 2021 08:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aLWe12uJoW6Tr5t0/eOb90iUkYk4LWBq+lz5QePH0ZA=; b=lW5kUj1LCQPu2V3bcYvjd95sC8TGGgImzX4v4V/tyjO5APgC38CtSXtQ+XU/JT2jss HWelOjDgxa7CnQvveWUOzL+8H/nSbMN7f4ej9CANeej3XhT5s5wagSev5IIv0ViVF9+b nV9Fk/RBIpp12PD/bOZPaKj4V9VEYp7Njq4O4Ehc1fk3EWBrr7NbGmqVMu5mSbpld32i /8SWYp/EglZ4eChS07/GNIrZK55lJxXmmPK9WlAcqQuOysP4Xx4zrtFAXAHXqWR/nY+a bZbatphFvicregPmC5JCOvLmO8Xk4QLBGSyE0tn/xK9AEfsQ8x/cQmnIKdsuXprXaW6u swDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aLWe12uJoW6Tr5t0/eOb90iUkYk4LWBq+lz5QePH0ZA=; b=kQDSDlT0RjJkurLOh0deiCFvpHkuSEs/kfB0xKi7s9it86ygFTTf9tmoOTpyc2W/ug pzXgmJIkMC1D8nb7JDimC3Sor+P1feStxd45T7tp0ERhiFZ9s8GgWUzLNmAm9Kx7kdHZ WJ4XrIeVG+2mG1gcM136cFlcp00/lmcHIr98OueLCJ7+vF487p5p/pvHHmQaLBw0GBVL 7ebBXtUCtq9yd36lnbqkYLEMqofzmt89c9+g8lnyS3fXVSULMNR1Z9Z4ZvogNoCK5DnY AokmWTZmMaDXPRGmXJ8OAU1vCU2nwgyoFfGOV3clxYQpzdqUu7NTGwlrgpOO/LcAHzni 8HcQ== X-Gm-Message-State: AOAM5300UPtNFI3VA0SCJgmZtIlQnMV990sh4wNR+4MHkkmjTiisqaAt CoS25a9DvC+6IekifBoUgIt/hjTXgKo= X-Received: by 2002:a37:ae43:: with SMTP id x64mr18843402qke.55.1634484584758; Sun, 17 Oct 2021 08:29:44 -0700 (PDT) Received: from localhost (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id o130sm5256949qke.123.2021.10.17.08.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 08:29:44 -0700 (PDT) Date: Sun, 17 Oct 2021 11:29:41 -0400 From: Trevor Woerner To: Johan Jonker Cc: linux-kernel@vger.kernel.org, Rob Herring , Heiko Stuebner , Chen-Yu Tsai , David Wu , Ezequiel Garcia , Cameron Nemo , Robin Murphy , Elaine Zhang , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/Rockchip SoC support" , "open list:ARM/Rockchip SoC support" Subject: Re: [PATCH 1/2] arm64: dts: rk3328: add gpu opp table Message-ID: <20211017152941.GA33697@localhost> References: <20211016154548.29555-1-twoerner@gmail.com> <67c7c3c6-b946-a6bc-24fd-85f56bcec7f3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <67c7c3c6-b946-a6bc-24fd-85f56bcec7f3@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 2021-10-16 @ 10:45:04 PM, Johan Jonker wrote: > On 10/16/21 5:45 PM, Trevor Woerner wrote: > > Add an operating-points table and cooling entry to the GPU on the > > RK3328 SoC to improve its performance. According to its datasheet[1] > > the maximum frequency of the Mali-450 MP2 GPU found on the RK3328 SoC > > is 500MHz. > > > > On my rock64 device, under x11, glmark2-es2 performance increased from > > around 60 to just over 100. Same device running glmark2-es2 under > > wayland/weston improved from just over 100 to just over 200. > > > > [1] https://rockchip.fr/RK3328%20datasheet%20V1.2.pdf > > > > Signed-off-by: Trevor Woerner > > --- > > arch/arm64/boot/dts/rockchip/rk3328.dtsi | 26 +++++++++++++++++++++++- > > 1 file changed, 25 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi > > index 8c821acb21ff..5e1dcf71e414 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi > > +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi > > @@ -532,7 +532,8 @@ map0 { > > cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > - <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > contribution = <4096>; > > }; > > }; > > @@ -617,6 +618,29 @@ gpu: gpu@ff300000 { > > clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; > > clock-names = "bus", "core"; > > resets = <&cru SRST_GPU_A>; > > + operating-points-v2 = <&gpu_opp_table>; > > + #cooling-cells = <2>; > > + }; > > + > > > + gpu_opp_table: gpu-opp-table { > > After the conversion to YAML of the Operating Performance Points(OPP) > binding the operating-points-v2 property expects the nodename to have > the '^opp-table(-[a-z0-9]+)?$' format. > > make ARCH=arm64 dtbs_check > DT_SCHEMA_FILES=Documentation/devicetree/bindings/opp/opp-v2.yaml Thanks, I wasn't aware. > > + compatible = "operating-points-v2"; > > + > > + opp-200000000 { > > + opp-hz = /bits/ 64 <200000000>; > > + opp-microvolt = <1100000>; > > + }; > > + opp-300000000 { > > + opp-hz = /bits/ 64 <300000000>; > > + opp-microvolt = <1100000>; > > + }; > > + opp-400000000 { > > + opp-hz = /bits/ 64 <400000000>; > > + opp-microvolt = <1100000>; > > + }; > > + opp-500000000 { > > + opp-hz = /bits/ 64 <500000000>; > > + opp-microvolt = <1100000>; > > + }; > > }; > > opp-microvolt has the same value for every node vs. table below? On page 1 of the schematic for the rock64 https://files.pine64.org/doc/rock64/ROCK64_Schematic_v3.0_20181105.pdf is a table ("Power Timing") showing BUCK1 at 1.1V. I interpreted this to mean that VDD_LOG should always be at 1.1V, regardless of frequency. > See also previous discussion: > > https://lore.kernel.org/linux-rockchip/3c95c29b-6c07-5945-ac22-d683997e1ca0@arm.com/ > > Is that now fixed/checked? I wasn't aware of the previous/on-going discussion regarding a gpu opp table for this SoC. Perhaps that explains my suspicions? I couldn't help wonder why the frequency is always reported as 163840000 even when I have an opp table that only has the 500MHz entry? I'll investigate whether I can prove or disprove the scaling is actually occurring? Best regards, Trevor