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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 9BCA1C4338F for ; Thu, 29 Jul 2021 20:49:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 818F660F5C for ; Thu, 29 Jul 2021 20:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbhG2UtP (ORCPT ); Thu, 29 Jul 2021 16:49:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbhG2UtO (ORCPT ); Thu, 29 Jul 2021 16:49:14 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA527C061765; Thu, 29 Jul 2021 13:49:09 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id b128so4538093wmb.4; Thu, 29 Jul 2021 13:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w7rlS789IwgWOu8sIYtR7tqkgkaO1gIx+9/djlmIsjw=; b=hePKOPuIIlnAtoZEz8val+chOEf8rJ7kzDrFbr157HgnPoDVRtY059x6N91MtMpQiN i3MqE5tvyQ5TAyTg9vM6mw/qSOYzsd64vgehdXnhKJbddyoOBIKDmlSBN2ac4AFGM0md vfISX61P1x2bWXSzCmxafEDFt66XYhpjkINkU9Z455HUDmfwuko9p63/HAUp/bwgiHtV IMQPamLEriq+766cvyptqUAYmoC3x0HifCe/YVWKcSv4v3SetAx8o83afYhdy61wJOsS 1FLHySZ7pOEur5JsLlXjylFwr/MNuqIHx2d0b4yoR8dExNw5gxakvCgPN0ldJK4BfIiF kTaw== 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=w7rlS789IwgWOu8sIYtR7tqkgkaO1gIx+9/djlmIsjw=; b=SMtrso0D5Ol+Izz7MwR8cYxvQM03vrMnULhfTZa04AxTJZSbsXgn/IsLEqKwMo9S+d qGBJ6CzH+3+nRK/8LHy1RMzhtPWrcEKOL3BC3WPzl6ai6ip6wHRVGdSrnPfdAudcgKqz EKHzmHRlX/ylJqc/5BN38nusj44nI4b9NSuPzwYLX/7sAtHsf3IpVB+r91YUOYHB9cfj HuWpZL+yO9kDZarHo5lyXUkGFn5Gbc7EuHDO9OlyrC8E5lwaNXO4wJkGcjyk2YUxgYA1 wJVtNI69QuLmI0TBw/nYIH8JrE0lgB+nKEaUAAAivd+vUs6xystC63tJ6JpQuaNBFg68 ZWCA== X-Gm-Message-State: AOAM530cZP4rvBeoeaXmBPCZZNNU8N4KecPsgS5UYjUMfVUmcN94NvQY S2VtjnXl9mrQKU++vl0nVdKo96eXIVqx9zzezds= X-Google-Smtp-Source: ABdhPJwrrK8qfqv4dkeGpyNXWI9QqAVnY/HT978HGofFkhk6FkqxWZ2UrgZfiUdhYpi3+dyXWle5jXmbiZpkpyKssrA= X-Received: by 2002:a7b:cc8b:: with SMTP id p11mr296283wma.164.1627591748230; Thu, 29 Jul 2021 13:49:08 -0700 (PDT) MIME-Version: 1.0 References: <20210729183942.2839925-1-robdclark@gmail.com> <1a38a590-a64e-58ef-1bbf-0ae49c004d05@linaro.org> In-Reply-To: From: Rob Clark Date: Thu, 29 Jul 2021 13:53:17 -0700 Message-ID: Subject: Re: [PATCH] drm/msm: Disable frequency clamping on a630 To: Caleb Connolly Cc: dri-devel , freedreno , linux-arm-msm , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jordan Crouse , Jonathan Marek , Sai Prakash Ranjan , Bjorn Andersson , Sharat Masetty , Akhil P Oommen , open list , Stephen Boyd 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: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. BR, -R 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=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 6C4B2C4338F for ; Thu, 29 Jul 2021 20:49:11 +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 2AB7760F4B for ; Thu, 29 Jul 2021 20:49:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2AB7760F4B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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 8B0986EE67; Thu, 29 Jul 2021 20:49:10 +0000 (UTC) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by gabe.freedesktop.org (Postfix) with ESMTPS id AA4C66EE6B; Thu, 29 Jul 2021 20:49:09 +0000 (UTC) Received: by mail-wm1-x333.google.com with SMTP id k4so4542510wms.3; Thu, 29 Jul 2021 13:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w7rlS789IwgWOu8sIYtR7tqkgkaO1gIx+9/djlmIsjw=; b=hePKOPuIIlnAtoZEz8val+chOEf8rJ7kzDrFbr157HgnPoDVRtY059x6N91MtMpQiN i3MqE5tvyQ5TAyTg9vM6mw/qSOYzsd64vgehdXnhKJbddyoOBIKDmlSBN2ac4AFGM0md vfISX61P1x2bWXSzCmxafEDFt66XYhpjkINkU9Z455HUDmfwuko9p63/HAUp/bwgiHtV IMQPamLEriq+766cvyptqUAYmoC3x0HifCe/YVWKcSv4v3SetAx8o83afYhdy61wJOsS 1FLHySZ7pOEur5JsLlXjylFwr/MNuqIHx2d0b4yoR8dExNw5gxakvCgPN0ldJK4BfIiF kTaw== 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=w7rlS789IwgWOu8sIYtR7tqkgkaO1gIx+9/djlmIsjw=; b=PZH9Z5zHgg5izFdrvWq3kpBGCZ++JA4pbhctF7nW8JcwRFiTJdRxhHHYgL1spxRXQz mgqdeVqODJZnXvcKm9P6J4WKNHTV9D7UzlkumeBd/BQZs7cEK3eIffP++CqBHiDXkfW3 ZJustHErxAtEZCG0I/gIGEOtxzWYGzIheOKcy42Ianga9YmQyn9lYy1tFfqFwa6JMOXI fAnNOXbBAikkxK4Mg054eZc0s5OwwvZ7LjC2H6KrnydC0oeKyVQLwkRDzvDsWZELVpKC XOCIUHPIXziXDa2xEuBZfG1cGgNbnMG3l+rVeJsVPucD7Ae90DnPtlNGwKWEzCxwitFo EgPw== X-Gm-Message-State: AOAM531on77DxFFmryWv5C7CLYZDFIN9bPKnect1NUbJHetwXldLRi0J U/mPCFjdq/GAJyrB6vIB6C5SHzc5tKdocTrNeDY= X-Google-Smtp-Source: ABdhPJwrrK8qfqv4dkeGpyNXWI9QqAVnY/HT978HGofFkhk6FkqxWZ2UrgZfiUdhYpi3+dyXWle5jXmbiZpkpyKssrA= X-Received: by 2002:a7b:cc8b:: with SMTP id p11mr296283wma.164.1627591748230; Thu, 29 Jul 2021 13:49:08 -0700 (PDT) MIME-Version: 1.0 References: <20210729183942.2839925-1-robdclark@gmail.com> <1a38a590-a64e-58ef-1bbf-0ae49c004d05@linaro.org> In-Reply-To: From: Rob Clark Date: Thu, 29 Jul 2021 13:53:17 -0700 Message-ID: Subject: Re: [PATCH] drm/msm: Disable frequency clamping on a630 To: Caleb Connolly 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: , Cc: 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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. BR, -R