From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6CCBC433F5 for ; Fri, 3 Sep 2021 19:39:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 981E3604AC for ; Fri, 3 Sep 2021 19:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349686AbhICTkw (ORCPT ); Fri, 3 Sep 2021 15:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349516AbhICTkv (ORCPT ); Fri, 3 Sep 2021 15:40:51 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA600C061757 for ; Fri, 3 Sep 2021 12:39:50 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id x27so394132lfu.5 for ; Fri, 03 Sep 2021 12:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q/mMqrwEsTCjyLsgA0ikvXEubjygmiehwCmD4JsY2Oo=; b=e5KHOH74YJ5L0QdbPHJWvvNhRVg/kBYpih9FO9zzwTE3Q95WeI/s7HOBinP1qxUIZB QAnJYNt+L1n3Q1Q6X0ppIwQErEr9+ku2/sUUsPrIL8ry1YUEYkbZczH1n2G4sgcJpwlC OyvooXJFcMqYybUZPr/Tp0U4dLLYZJ0nsREnA1bJe/IEeffA+p15vQgG1GazeUiVB75u YHQK2m7Wt4ruuuxdJAk19NWUzUsnHXlHpcoPvWYpqRNkWLUoWuQWlfznNOzPmXPgaFPx CCvMEskqit7QrrcQ3bnSx3i95ugtRUclnRIOx4hxGieGT7BdAV0Hv/XNxCCNjH1LiGU7 g6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q/mMqrwEsTCjyLsgA0ikvXEubjygmiehwCmD4JsY2Oo=; b=LBnZoT+Uxf3HV+K75eUG2o7bqePr3vdERlttjhq5enyGwjhIAIfzwCEih8Zq0sm8L9 vcFBaArV19dHwd+X68psEFDo5FNuKdLrnmosXSX4wA6ATNybnel7P+zkRbEhMs0m/Qxl zoZcF9bhQm7LCpKBA7trpjfjz+98O9XQ2qjn3hstFrvWW/BG+Jb4So13z9gU5YFEsRF9 70fMLwDIXHDS8v1HL+xBjmZe58bKF9mXqwh09FH3A7zF1nQv5nhk1LECyv+S5XEqwCYT ZCwz+/kD/VTanGnn1/vfInEEXL5tz/Z6grU/LZpLV5mWxmeA9IxcVd/S19Uny70d4j25 X53A== X-Gm-Message-State: AOAM5338hQ3QywFCY3IALWgkznIFFtu5TQW+d6h9D1bB8VQtkN4XI8zN aziSiqjB2Z24z6BJZvhtk64SGPOsdlsgp3F9FFd6sQ== X-Google-Smtp-Source: ABdhPJwPSfd3cWkRvtg1v4fnIt3ikKAKPBDq7JAoqQpURwTDA2QPNnmpp0MqualUro8TR/v6pKApJ8aZS9sZIfFIKQ0= X-Received: by 2002:a05:6512:118e:: with SMTP id g14mr348609lfr.661.1630697988724; Fri, 03 Sep 2021 12:39:48 -0700 (PDT) MIME-Version: 1.0 References: <20210729183942.2839925-1-robdclark@gmail.com> <1a38a590-a64e-58ef-1bbf-0ae49c004d05@linaro.org> In-Reply-To: From: John Stultz Date: Fri, 3 Sep 2021 12:39:38 -0700 Message-ID: Subject: Re: [PATCH] drm/msm: Disable frequency clamping on a630 To: Rob Clark Cc: Caleb Connolly , Rob Clark , freedreno , Sai Prakash Ranjan , Jonathan Marek , David Airlie , linux-arm-msm , Sharat Masetty , Akhil P Oommen , dri-devel , Jordan Crouse , Stephen Boyd , Bjorn Andersson , Sean Paul , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, Jul 29, 2021 at 1:49 PM Rob Clark wrote: > On Thu, Jul 29, 2021 at 1:28 PM Caleb Connolly > wrote: > > On 29/07/2021 21:24, Rob Clark wrote: > > > On Thu, Jul 29, 2021 at 1:06 PM Caleb Connolly > > > wrote: > > >> > > >> Hi Rob, > > >> > > >> I've done some more testing! It looks like before that patch ("drm/msm: Devfreq tuning") the GPU would never get above > > >> the second frequency in the OPP table (342MHz) (at least, not in glxgears). With the patch applied it would more > > >> aggressively jump up to the max frequency which seems to be unstable at the default regulator voltages. > > > > > > *ohh*, yeah, ok, that would explain it > > > > > >> Hacking the pm8005 s1 regulator (which provides VDD_GFX) up to 0.988v (instead of the stock 0.516v) makes the GPU stable > > >> at the higher frequencies. > > >> > > >> Applying this patch reverts the behaviour, and the GPU never goes above 342MHz in glxgears, losing ~30% performance in > > >> glxgear. > > >> > > >> I think (?) that enabling CPR support would be the proper solution to this - that would ensure that the regulators run > > >> at the voltage the hardware needs to be stable. > > >> > > >> Is hacking the voltage higher (although ideally not quite that high) an acceptable short term solution until we have > > >> CPR? Or would it be safer to just not make use of the higher frequencies on a630 for now? > > >> > > > > > > tbh, I'm not sure about the regulator stuff and CPR.. Bjorn is already > > > on CC and I added sboyd, maybe one of them knows better. > > > > > > In the short term, removing the higher problematic OPPs from dts might > > > be a better option than this patch (which I'm dropping), since there > > > is nothing stopping other workloads from hitting higher OPPs. > > Oh yeah that sounds like a more sensible workaround than mine . > > > > > > I'm slightly curious why I didn't have problems at higher OPPs on my > > > c630 laptop (sdm850) > > Perhaps you won the sillicon lottery - iirc sdm850 is binned for higher clocks as is out of the factory. > > > > Would it be best to drop the OPPs for all devices? Or just those affected? I guess it's possible another c630 might > > crash where yours doesn't? > > I've not heard any reports of similar issues from the handful of other > folks with c630's on #aarch64-laptops.. but I can't really say if that > is luck or not. > > Maybe just remove it for affected devices? But I'll defer to Bjorn. Just as another datapoint, I was just marveling at how suddenly smooth the UI was performing on db845c and Caleb pointed me at the "drm/msm: Devfreq tuning" patch as the likely cause of the improvement, and mid-discussion my board crashed into USB crash mode: [ 146.157696][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.163303][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.168837][ C0] adreno 5000000.gpu: RBBM | ATB bus overflow [ 146.174960][ C0] adreno 5000000.gpu: CP | HW fault | status=0x00000000 [ 146.181917][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.187547][ C0] adreno 5000000.gpu: CP illegal instruction error [ 146.194009][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.308909][ T9] Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP [ 146.317150][ T9] Modules linked in: [ 146.320941][ T9] CPU: 3 PID: 9 Comm: kworker/u16:1 Tainted: G W 5.14.0-mainline-06795-g42b258c2275c #24 [ 146.331974][ T9] Hardware name: Thundercomm Dragonboar Format: Log Type - Time(microsec) - Message - Optional Info Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic S - QC_IMAGE_VERSION_STRING=BOOT.XF.2.0-00371-SDM845LZB-1 S - IMAGE_VARIANT_STRING=SDM845LA S - OEM_IMAGE_VERSION_STRING=TSBJ-FA-PC-02170 So Caleb sent me to this thread. :) I'm still trying to trip it again, but it does seem like db845c is also seeing some stability issues with Linus' HEAD. thanks -john From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7E05C433FE for ; Fri, 3 Sep 2021 19:39:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FCC460F9C for ; Fri, 3 Sep 2021 19:39:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6FCC460F9C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8DD3D6E8D7; Fri, 3 Sep 2021 19:39:51 +0000 (UTC) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by gabe.freedesktop.org (Postfix) with ESMTPS id A244D6E8D5 for ; Fri, 3 Sep 2021 19:39:50 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id l10so396807lfg.4 for ; Fri, 03 Sep 2021 12:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q/mMqrwEsTCjyLsgA0ikvXEubjygmiehwCmD4JsY2Oo=; b=e5KHOH74YJ5L0QdbPHJWvvNhRVg/kBYpih9FO9zzwTE3Q95WeI/s7HOBinP1qxUIZB QAnJYNt+L1n3Q1Q6X0ppIwQErEr9+ku2/sUUsPrIL8ry1YUEYkbZczH1n2G4sgcJpwlC OyvooXJFcMqYybUZPr/Tp0U4dLLYZJ0nsREnA1bJe/IEeffA+p15vQgG1GazeUiVB75u YHQK2m7Wt4ruuuxdJAk19NWUzUsnHXlHpcoPvWYpqRNkWLUoWuQWlfznNOzPmXPgaFPx CCvMEskqit7QrrcQ3bnSx3i95ugtRUclnRIOx4hxGieGT7BdAV0Hv/XNxCCNjH1LiGU7 g6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q/mMqrwEsTCjyLsgA0ikvXEubjygmiehwCmD4JsY2Oo=; b=MXiMJbm4Q9jgldDBON0imyeVlqRA0dkp/1TtrxZ0tFXTPWAY6WsvRsIIVSsTCnfEwg lz/t2n15xFEPTF7UYQWOsOEPzQBV8QBytUcSdY5DZJMIlyaS9SpwKmLuA33wBW6pk6Eb WOCez2I55N9tMlpPeYg5dIocVPWTUVYbo3EUegYdDMzQO7ipyANMs+STN1mgw5Eq5q/C pMTARNzYdXBykkEh571Sdx1Y6tVM3ubWudgmDwa/NQ61m0Il4kYeYxVNQPI615rKP3/Q Kv6mbGAk3JxQR3LNlUZ1R8NF4dLeGjIq5wpjgdC8zOdcLEs7YOqBAu0hIszkGNQOpAl7 17vA== X-Gm-Message-State: AOAM532CiA17TnsnqFdbHcFU2btX0KgE7SrxAi7wv/iPRyNnVGc9TBa9 KZ5OFN1tBMNL4Lk0Owj6x655CtjJDzsSJ8OtabGTvA== X-Google-Smtp-Source: ABdhPJwPSfd3cWkRvtg1v4fnIt3ikKAKPBDq7JAoqQpURwTDA2QPNnmpp0MqualUro8TR/v6pKApJ8aZS9sZIfFIKQ0= X-Received: by 2002:a05:6512:118e:: with SMTP id g14mr348609lfr.661.1630697988724; Fri, 03 Sep 2021 12:39:48 -0700 (PDT) MIME-Version: 1.0 References: <20210729183942.2839925-1-robdclark@gmail.com> <1a38a590-a64e-58ef-1bbf-0ae49c004d05@linaro.org> In-Reply-To: From: John Stultz Date: Fri, 3 Sep 2021 12:39:38 -0700 Message-ID: Subject: Re: [PATCH] drm/msm: Disable frequency clamping on a630 To: Rob Clark Cc: Caleb Connolly , Rob Clark , freedreno , Sai Prakash Ranjan , Jonathan Marek , David Airlie , linux-arm-msm , Sharat Masetty , Akhil P Oommen , dri-devel , Jordan Crouse , Stephen Boyd , Bjorn Andersson , Sean Paul , open list Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Jul 29, 2021 at 1:49 PM Rob Clark wrote: > On Thu, Jul 29, 2021 at 1:28 PM Caleb Connolly > wrote: > > On 29/07/2021 21:24, Rob Clark wrote: > > > On Thu, Jul 29, 2021 at 1:06 PM Caleb Connolly > > > wrote: > > >> > > >> Hi Rob, > > >> > > >> I've done some more testing! It looks like before that patch ("drm/msm: Devfreq tuning") the GPU would never get above > > >> the second frequency in the OPP table (342MHz) (at least, not in glxgears). With the patch applied it would more > > >> aggressively jump up to the max frequency which seems to be unstable at the default regulator voltages. > > > > > > *ohh*, yeah, ok, that would explain it > > > > > >> Hacking the pm8005 s1 regulator (which provides VDD_GFX) up to 0.988v (instead of the stock 0.516v) makes the GPU stable > > >> at the higher frequencies. > > >> > > >> Applying this patch reverts the behaviour, and the GPU never goes above 342MHz in glxgears, losing ~30% performance in > > >> glxgear. > > >> > > >> I think (?) that enabling CPR support would be the proper solution to this - that would ensure that the regulators run > > >> at the voltage the hardware needs to be stable. > > >> > > >> Is hacking the voltage higher (although ideally not quite that high) an acceptable short term solution until we have > > >> CPR? Or would it be safer to just not make use of the higher frequencies on a630 for now? > > >> > > > > > > tbh, I'm not sure about the regulator stuff and CPR.. Bjorn is already > > > on CC and I added sboyd, maybe one of them knows better. > > > > > > In the short term, removing the higher problematic OPPs from dts might > > > be a better option than this patch (which I'm dropping), since there > > > is nothing stopping other workloads from hitting higher OPPs. > > Oh yeah that sounds like a more sensible workaround than mine . > > > > > > I'm slightly curious why I didn't have problems at higher OPPs on my > > > c630 laptop (sdm850) > > Perhaps you won the sillicon lottery - iirc sdm850 is binned for higher clocks as is out of the factory. > > > > Would it be best to drop the OPPs for all devices? Or just those affected? I guess it's possible another c630 might > > crash where yours doesn't? > > I've not heard any reports of similar issues from the handful of other > folks with c630's on #aarch64-laptops.. but I can't really say if that > is luck or not. > > Maybe just remove it for affected devices? But I'll defer to Bjorn. Just as another datapoint, I was just marveling at how suddenly smooth the UI was performing on db845c and Caleb pointed me at the "drm/msm: Devfreq tuning" patch as the likely cause of the improvement, and mid-discussion my board crashed into USB crash mode: [ 146.157696][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.163303][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.168837][ C0] adreno 5000000.gpu: RBBM | ATB bus overflow [ 146.174960][ C0] adreno 5000000.gpu: CP | HW fault | status=0x00000000 [ 146.181917][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.187547][ C0] adreno 5000000.gpu: CP illegal instruction error [ 146.194009][ C0] adreno 5000000.gpu: CP | AHB bus error [ 146.308909][ T9] Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP [ 146.317150][ T9] Modules linked in: [ 146.320941][ T9] CPU: 3 PID: 9 Comm: kworker/u16:1 Tainted: G W 5.14.0-mainline-06795-g42b258c2275c #24 [ 146.331974][ T9] Hardware name: Thundercomm Dragonboar Format: Log Type - Time(microsec) - Message - Optional Info Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic S - QC_IMAGE_VERSION_STRING=BOOT.XF.2.0-00371-SDM845LZB-1 S - IMAGE_VARIANT_STRING=SDM845LA S - OEM_IMAGE_VERSION_STRING=TSBJ-FA-PC-02170 So Caleb sent me to this thread. :) I'm still trying to trip it again, but it does seem like db845c is also seeing some stability issues with Linus' HEAD. thanks -john