Message ID | 20221027073200.3885839-1-nunes.erico@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp89319wru; Thu, 27 Oct 2022 00:48:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wfQopD8Bd1WHdO1IbpkVirxDOSyt5c4VvsovHTB1v2uWmu9j5YviS0fVWgNtFTTPFL+xp X-Received: by 2002:a63:cf0d:0:b0:46e:96b9:2760 with SMTP id j13-20020a63cf0d000000b0046e96b92760mr32307002pgg.328.1666856907833; Thu, 27 Oct 2022 00:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666856907; cv=none; d=google.com; s=arc-20160816; b=vx1JBLwH3FSwYg831NaWqzIxLUNkbZONzJ2zbioh73WK6LNyAvwfkWmQIwuvvjM/vD 8Arz3DzmrJtTQfV8FFOSxmkHbYal/xE616pL4AoRR/VtdidaGbywy5yY3BAFL9mkXHiR fJN2d6SSy6++FOUqi0CX8ZMG4pL/Gy43dsKQrxv/ccNAmU3GXb7+rQAyVKm/m/dvAg3J wviKHmsOoPdaZ5UZtmS4Zii0HU78fT07NW9/WxWM+M/t5O5pp3SoYnLWwR/RSglcFHBV g8W2HyIOTiplvnxwKWZ2LI6eQSolzwnALao9S9e/HAAmcimyFvmEEmvolviAFhDUVb+f W34Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HOFnbsaMjj+z0QevarG84ke4eXp98Xi5RLnaRZADVG8=; b=Z4UcOhOgNsTq5lib5Y/f9zSJ+OG+tIUgMHRBKjxJCGJJRvEIJGqrksJjm2shev8I1q b2eNVsjjj1dJb2FiBbZdkL4BXfqD77FVakf0nw1RSHUeG8Xsm7WvsnE2gy5N4dwV5uVQ lJDQ1uB79J1FFbcQ5+j5CdYGrFUZVKdv7IfGhNBz/xvlOWJE/cdps+scNwWZU6YHNDDL 93gygjlCDT19FVp9Ae1A7DQ3hcNinBHJLSWalIhap6y5uJ219mlY1UbyQZ06/GEZH3T/ SpgG2DHGKk6PN3FXzgTITDlTIEgich5tL0LL6iAjocoGCj53IcUSoVIoq2P0CGobZVgg /ItA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JijJgT1N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qe13-20020a17090b4f8d00b001fe280041e8si1117433pjb.37.2022.10.27.00.48.14; Thu, 27 Oct 2022 00:48:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JijJgT1N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234742AbiJ0Hc3 (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Thu, 27 Oct 2022 03:32:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234737AbiJ0Hc1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Oct 2022 03:32:27 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD8AA165509 for <linux-kernel@vger.kernel.org>; Thu, 27 Oct 2022 00:32:26 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id n14so332631wmq.3 for <linux-kernel@vger.kernel.org>; Thu, 27 Oct 2022 00:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=HOFnbsaMjj+z0QevarG84ke4eXp98Xi5RLnaRZADVG8=; b=JijJgT1N/Pkpag73UjzE9AE7TzOg/CBoMBHYIQZZpOFuSqjMxDLd+ZphHNzknTCjFM CY5RIk/L7hru6tivh63LiMxr0oTClgyEgvWkt4FgJ6jQkEmpG54binJTkyVxgDR8sjn8 3vjM0WtfQPy9paY9Ch+htY6gliRlzEjN5xL+ZmRs4kA1npvKDU1Mck5xxAjTMoCxgiZf KeiQxcA9qxxxbZ6OY9I+Lezzun0pZchu2vRSXHVJWW73D6eMedjsBN9d1sg+KBoasTLn soByV6hbvatP/U21JJUednK9uQA5BWv6+bf3M1+FKPYrDi309lMpUtDIDjwjPwUJSe4e 2Gcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HOFnbsaMjj+z0QevarG84ke4eXp98Xi5RLnaRZADVG8=; b=H2GzjhWiThgUhKbsSAOAt5a4U1F7wIaiZPc6OWnmNDyx3cDJW0ncv+3df4pq5923/8 eHv+BKkDRryfefM2crD3rojms/pEEytXxc7+6LKfurM/rv1vDRe00xoDT/19MVja9WSE U3LFWt2rMvOgzDTO9UqcmmRHO1YbTsfpwTZNB1hec6CVl3O2XmFXrQ0FRakW3jpvTUOc kf3Nm4e7Cne2FAajPlNmzo+CKWKLhOW3wt2+WGkPhE7k5d3dgBpZiwOGaUx7D+uEu2aS xFR3IRtJ6vpcen1sBz2ycFNLKdU/2kqWaVcp8PEHXpyis7/zgy8Bsvnc2O9sJIP0j+Y2 Tk4w== X-Gm-Message-State: ACrzQf1iV7QJXtGifWbuj3wtI5gvK96iLowFUyWeVMnZh76LOU//r/Df 1Kz+h3qiNSTWL8vvNV32VTd9jaeukXbJhf1o X-Received: by 2002:a05:600c:524c:b0:3cc:ed19:707 with SMTP id fc12-20020a05600c524c00b003cced190707mr4951714wmb.80.1666855945320; Thu, 27 Oct 2022 00:32:25 -0700 (PDT) Received: from centennial.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id v18-20020a5d6b12000000b0022e47b57735sm398251wrw.97.2022.10.27.00.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 00:32:24 -0700 (PDT) From: Erico Nunes <nunes.erico@gmail.com> To: Viresh Kumar <viresh.kumar@linaro.org>, Qiang Yu <yuq825@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Erico Nunes <nunes.erico@gmail.com> Subject: [PATCH v2] drm/lima: Fix opp clkname setting in case of missing regulator Date: Thu, 27 Oct 2022 09:32:00 +0200 Message-Id: <20221027073200.3885839-1-nunes.erico@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747826149097985279?= X-GMAIL-MSGID: =?utf-8?q?1747826149097985279?= |
Series |
[v2] drm/lima: Fix opp clkname setting in case of missing regulator
|
|
Commit Message
Erico Nunes
Oct. 27, 2022, 7:32 a.m. UTC
Commit d8c32d3971e4 ("drm/lima: Migrate to dev_pm_opp_set_config()")
introduced a regression as it may undo the clk_names setting in case
the optional regulator is missing. This resulted in test and performance
regressions with lima.
Restore the old behavior where clk_names is set separately so it is not
undone in case of a missing optional regulator.
Fixes: d8c32d3971e4 ("drm/lima: Migrate to dev_pm_opp_set_config()")
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
v2: revert back to using devm_pm_opp_set_clkname and
devm_pm_opp_set_regulators
---
drivers/gpu/drm/lima/lima_devfreq.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
Comments
On 27-10-22, 09:32, Erico Nunes wrote: > Commit d8c32d3971e4 ("drm/lima: Migrate to dev_pm_opp_set_config()") > introduced a regression as it may undo the clk_names setting in case > the optional regulator is missing. This resulted in test and performance > regressions with lima. > > Restore the old behavior where clk_names is set separately so it is not > undone in case of a missing optional regulator. > > Fixes: d8c32d3971e4 ("drm/lima: Migrate to dev_pm_opp_set_config()") > Signed-off-by: Erico Nunes <nunes.erico@gmail.com> > --- > v2: revert back to using devm_pm_opp_set_clkname and > devm_pm_opp_set_regulators > --- > drivers/gpu/drm/lima/lima_devfreq.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c > index 011be7ff51e1..bc8fb4e38d0a 100644 > --- a/drivers/gpu/drm/lima/lima_devfreq.c > +++ b/drivers/gpu/drm/lima/lima_devfreq.c > @@ -112,11 +112,6 @@ int lima_devfreq_init(struct lima_device *ldev) > unsigned long cur_freq; > int ret; > const char *regulator_names[] = { "mali", NULL }; > - const char *clk_names[] = { "core", NULL }; > - struct dev_pm_opp_config config = { > - .regulator_names = regulator_names, > - .clk_names = clk_names, > - }; > > if (!device_property_present(dev, "operating-points-v2")) > /* Optional, continue without devfreq */ > @@ -124,7 +119,15 @@ int lima_devfreq_init(struct lima_device *ldev) > > spin_lock_init(&ldevfreq->lock); > > - ret = devm_pm_opp_set_config(dev, &config); > + /* > + * clkname is set separately so it is not affected by the optional > + * regulator setting which may return error. > + */ > + ret = devm_pm_opp_set_clkname(dev, "core"); > + if (ret) > + return ret; > + > + ret = devm_pm_opp_set_regulators(dev, regulator_names); > if (ret) { > /* Continue if the optional regulator is missing */ > if (ret != -ENODEV) Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
On Thu, Oct 27, 2022 at 10:05 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Thanks.
Could someone take a final look and apply this? I don't have drm-misc
commit rights.
Erico
Applied to drm-misc-fixes. On Mon, Oct 31, 2022 at 6:35 PM Erico Nunes <nunes.erico@gmail.com> wrote: > > On Thu, Oct 27, 2022 at 10:05 AM Viresh Kumar <viresh.kumar@linaro.org> wrote: > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > > Thanks. > > Could someone take a final look and apply this? I don't have drm-misc > commit rights. > > Erico
diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c index 011be7ff51e1..bc8fb4e38d0a 100644 --- a/drivers/gpu/drm/lima/lima_devfreq.c +++ b/drivers/gpu/drm/lima/lima_devfreq.c @@ -112,11 +112,6 @@ int lima_devfreq_init(struct lima_device *ldev) unsigned long cur_freq; int ret; const char *regulator_names[] = { "mali", NULL }; - const char *clk_names[] = { "core", NULL }; - struct dev_pm_opp_config config = { - .regulator_names = regulator_names, - .clk_names = clk_names, - }; if (!device_property_present(dev, "operating-points-v2")) /* Optional, continue without devfreq */ @@ -124,7 +119,15 @@ int lima_devfreq_init(struct lima_device *ldev) spin_lock_init(&ldevfreq->lock); - ret = devm_pm_opp_set_config(dev, &config); + /* + * clkname is set separately so it is not affected by the optional + * regulator setting which may return error. + */ + ret = devm_pm_opp_set_clkname(dev, "core"); + if (ret) + return ret; + + ret = devm_pm_opp_set_regulators(dev, regulator_names); if (ret) { /* Continue if the optional regulator is missing */ if (ret != -ENODEV)