Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp555606ybt; Fri, 10 Jul 2020 06:49:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmSb9Zacz+GBaD8K3It9XtQuBnkjoEpfdagx8c+PlUt4gkwYahMwnmUfGMzVBiqt9P2+CG X-Received: by 2002:a17:906:7283:: with SMTP id b3mr63707955ejl.163.1594388960258; Fri, 10 Jul 2020 06:49:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594388960; cv=none; d=google.com; s=arc-20160816; b=eur+yJPvO3heDPmeR7iuBM9dePSlf5jQyhFHJnhoUGoiFuDKJB6t7zIKoyKcXYAI/w su4iVUbp2KqEvi49/uMIJ9rPaPmmcRw7ulBO6nVah3YffhU5VvDewIimLE/4eRywW56B kNXI8pRFUyKBH6tiq4x7cZ/++wuAm49g9apZHIPJBKSkQi41iqayIMDYZbp1b275MaKA J2VPj3OGm0qGXehb5b8cLOJHSjlo1qZqXgfKztKZF5eYsIofyVRHFG7bNckrm8L2oN6p DkQ2JWB8m0rqFiDm0aZB0Mt7I3wqi/UyOPbw2YBUemAt1SkeKD2z/Xdlqpb/B19O0EpM 8nWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=Ermy1NiTIasCWgG8l4eJfsbME3tGp4LPfrJcemoGPXM=; b=q5Ud2DUBS/gqhNbC41qa4lRMoFhro6Ll4clwr2NgkqDlYfBdq9W8XSxaVsp2RIT41j dTE0en34cK7S1aRArjhgGTlW1emmpeISZ9VqD/rEOEVRep3shJ/Hxzfwd6tCDXjNjP3Z 7gQ3b0RYm/U4sW+h3fnqB9bm6BEUhSCzmbkEMit8GANv9EHIrKT8r+DT3wpC5dL5InU7 O7ovPNc6lOdZHb1ZKdS7eywGt8VE7EfsJcM5EWTShUXYm/u2LHpZGEtp4OnIY5G/25er GeBcWWgISAmkOB+GoyxBze5PeeC7qazazE9XvNxgeXEkt9O0ONTxy0ewJcXR0wOJ3hYj yYUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KwyEeodt; 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 v12si3901115ejc.292.2020.07.10.06.48.57; Fri, 10 Jul 2020 06:49:20 -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=20161025 header.b=KwyEeodt; 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 S1728348AbgGJNps (ORCPT + 99 others); Fri, 10 Jul 2020 09:45:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726942AbgGJNpo (ORCPT ); Fri, 10 Jul 2020 09:45:44 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80541C08C5CE for ; Fri, 10 Jul 2020 06:45:44 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id q7so6538113ljm.1 for ; Fri, 10 Jul 2020 06:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Ermy1NiTIasCWgG8l4eJfsbME3tGp4LPfrJcemoGPXM=; b=KwyEeodt5NpEMJq67fztoSxejY3rRcicqAiurh9lc72Cg5Ikpu26p2wVaQGvfoljnj 83gkOAzdgb2aGHuW44nzRzMIkT1efKtlsV00Iiho5AMFMAwX+mCweGEIa15yvNmTJvg7 6UHxoilcxq+PEubjb8kD8dw6BKqzZXWcXaaevZu9o71tiU7UZPhy9qCIo9hrsIuj/F/O G/O0xg5oLTGXJ6UX0/u8+NKWs47dVwckSRicO+xDS6y79M6NZCuk+4EnQe9QZjnsewLq IsLO59TwzeXeEgJ0rLb9bf0+qihOsn9J30sTyFJJj9Nrq29gUyRIJUaJthzVBL/cl/R6 DN9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Ermy1NiTIasCWgG8l4eJfsbME3tGp4LPfrJcemoGPXM=; b=ewwvG1GXAQG4p0SW1Ei34YRqeYp1E18+qeUnPkqFA8bXyGiFF2lPfVc89N4VorpQhL tP1VbbW0QimtXKgsKqSby7ElYuUOEhGl0PTun7DKn7sEeLu0AZ2ivmEevYLZ7DAd822s ENILYk442y8aR+Mk8EDPgQP16jqOFhcRtEONWCRLvaJFu+9K6c+PVlRU2EcjGTXB8xRz 3fPSGxqQNiVfeyr54yD6Q76pV52S+tN9eCcnwVY2/uKUPNzfV9pbmlAm39oScelZDPFz f4h/g34VY8x6i2BMlxgpd4126iZMpHr/sfxjpUqlxWIIper5ObhhvUXp3I5DQ/tv9OC1 1H2A== X-Gm-Message-State: AOAM533172o56163vAfFAZg4heAaCh4PEIQAzp95MKqc57ezGHfOi6r6 NmsN4TWn8rthW37/BCm53gA= X-Received: by 2002:a2e:9996:: with SMTP id w22mr2932963lji.446.1594388742977; Fri, 10 Jul 2020 06:45:42 -0700 (PDT) Received: from [127.0.0.1] (84-10-202-70.dynamic.chello.pl. [84.10.202.70]) by smtp.gmail.com with ESMTPSA id m9sm2213915lfb.5.2020.07.10.06.45.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2020 06:45:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v3 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table From: Piotr Oniszczuk In-Reply-To: <20200709140322.131320-14-peron.clem@gmail.com> Date: Fri, 10 Jul 2020 15:45:40 +0200 Cc: Rob Herring , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Viresh Kumar , Nishanth Menon , Stephen Boyd , Maxime Ripard , "wens@csie.org" , "linux-kernel@vger.kernel.org" , dri-devel@lists.freedesktop.org Content-Transfer-Encoding: quoted-printable Message-Id: <0A3B73FE-0732-4024-9729-1FCE02006C27@gmail.com> References: <20200709140322.131320-1-peron.clem@gmail.com> <20200709140322.131320-14-peron.clem@gmail.com> To: =?utf-8?B?Q2zDqW1lbnQgUMOpcm9u?= X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Wiadomo=C5=9B=C4=87 napisana przez Cl=C3=A9ment P=C3=A9ron = w dniu 09.07.2020, o godz. 16:03: >=20 > Add an Operating Performance Points table for the GPU to > enable Dynamic Voltage & Frequency Scaling on the H6. >=20 > The voltage range is set with minival voltage set to the target > and the maximal voltage set to 1.2V. This allow DVFS framework to > work properly on board with fixed regulator. >=20 > Signed-off-by: Cl=C3=A9ment P=C3=A9ron > --- > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 ++++++++++++++++++++ > 1 file changed, 80 insertions(+) >=20 > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi = b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > index 8f514a2169aa..a69f9e09a829 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > @@ -174,6 +174,7 @@ gpu: gpu@1800000 { > clocks =3D <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; > clock-names =3D "core", "bus"; > resets =3D <&ccu RST_BUS_GPU>; > + operating-points-v2 =3D <&gpu_opp_table>; > #cooling-cells =3D <2>; > status =3D "disabled"; > }; > @@ -1036,4 +1037,83 @@ map0 { > }; > }; > }; > + > + gpu_opp_table: gpu-opp-table { > + compatible =3D "operating-points-v2"; > + > + opp@216000000 { > + opp-hz =3D /bits/ 64 <216000000>; > + opp-microvolt =3D <810000 810000 1200000>; > + }; > + > + opp@264000000 { > + opp-hz =3D /bits/ 64 <264000000>; > + opp-microvolt =3D <810000 810000 1200000>; > + }; > + > + opp@312000000 { > + opp-hz =3D /bits/ 64 <312000000>; > + opp-microvolt =3D <810000 810000 1200000>; > + }; > + > + opp@336000000 { > + opp-hz =3D /bits/ 64 <336000000>; > + opp-microvolt =3D <810000 810000 1200000>; > + }; > + > + opp@360000000 { > + opp-hz =3D /bits/ 64 <360000000>; > + opp-microvolt =3D <820000 820000 1200000>; > + }; > + > + opp@384000000 { > + opp-hz =3D /bits/ 64 <384000000>; > + opp-microvolt =3D <830000 830000 1200000>; > + }; > + > + opp@408000000 { > + opp-hz =3D /bits/ 64 <408000000>; > + opp-microvolt =3D <840000 840000 1200000>; > + }; > + > + opp@420000000 { > + opp-hz =3D /bits/ 64 <420000000>; > + opp-microvolt =3D <850000 850000 1200000>; > + }; > + > + opp@432000000 { > + opp-hz =3D /bits/ 64 <432000000>; > + opp-microvolt =3D <860000 860000 1200000>; > + }; > + > + opp@456000000 { > + opp-hz =3D /bits/ 64 <456000000>; > + opp-microvolt =3D <870000 870000 1200000>; > + }; > + > + opp@504000000 { > + opp-hz =3D /bits/ 64 <504000000>; > + opp-microvolt =3D <890000 890000 1200000>; > + }; > + > + opp@540000000 { > + opp-hz =3D /bits/ 64 <540000000>; > + opp-microvolt =3D <910000 910000 1200000>; > + }; > + > + opp@576000000 { > + opp-hz =3D /bits/ 64 <576000000>; > + opp-microvolt =3D <930000 930000 1200000>; > + }; > + > + opp@624000000 { > + opp-hz =3D /bits/ 64 <624000000>; > + opp-microvolt =3D <950000 950000 1200000>; > + }; > + > + opp@756000000 { > + opp-hz =3D /bits/ 64 <756000000>; > + opp-microvolt =3D <1040000 1040000 1200000>; > + }; > + }; > }; Clement, I gave run for v3 on H6 GS1 TVbox and what i discovered:=20 1. I have frequent hard hangs if DVFS is enabled (hard reset required), 2. hangs seems to be related to operating points changing - as limiting = OPP table to any single entry (tested on 5 highest OPP ) makes my GS1 = stable working, 3. hang seems to be exactly related to OPP changes as having OPP table = even with just 2 entries already gives hangs, 4. tunings with makes no difference (tested with = 0, 2500 and 25000). Also increasing 2 = times up (to 64000) makes no change. Now I have 2 hypothesis:=20 a. issue is SW related: software operations in DVFS are somehow "unsafe" = at touching hardware (is it possible we have i.e. concurrency issue = here?);=20 b. issue is HW related: i.e. in steep-up OPP, time between sending = change Vdd-gpu command to HW for increasing Vdd and sending command to = HW for increasing GPU freq is too short. To investigate further I done following test: limit OPP table to 4 = entries+all 4 entries have the same Vdd.=20 If this test will pass the we know issue is b\.=20 If it will fail - then issue is a\.=20 And on my GS1 this test fails....so for me issue is a\ likely=E2=80=A6. let me know how i can help! br=