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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E301C433FE for ; Thu, 26 May 2022 13:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344645AbiEZNqE (ORCPT ); Thu, 26 May 2022 09:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231330AbiEZNqC (ORCPT ); Thu, 26 May 2022 09:46:02 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D72BE02E; Thu, 26 May 2022 06:45:58 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D829A1688; Thu, 26 May 2022 06:45:57 -0700 (PDT) Received: from [10.1.37.22] (e122027.cambridge.arm.com [10.1.37.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9F10E3F73D; Thu, 26 May 2022 06:45:55 -0700 (PDT) Message-ID: Date: Thu, 26 May 2022 14:45:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 15/31] drm/panfrost: Migrate to dev_pm_opp_set_config() Content-Language: en-GB To: Viresh Kumar , Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig Cc: linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <2a0970a5cf1fc92e16eb2b782798a6b609594cdc.1653564321.git.viresh.kumar@linaro.org> From: Steven Price In-Reply-To: <2a0970a5cf1fc92e16eb2b782798a6b609594cdc.1653564321.git.viresh.kumar@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/05/2022 12:42, Viresh Kumar wrote: > The OPP core now provides a unified API for setting all configuration > types, i.e. dev_pm_opp_set_config(). > > Lets start using it. > > Signed-off-by: Viresh Kumar Acked-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_devfreq.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c > index 194af7f607a6..7826d9366d35 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c > +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c > @@ -91,6 +91,10 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev) > struct devfreq *devfreq; > struct thermal_cooling_device *cooling; > struct panfrost_devfreq *pfdevfreq = &pfdev->pfdevfreq; > + struct dev_pm_opp_config config = { > + .regulator_names = pfdev->comp->supply_names, > + .regulator_count = pfdev->comp->num_supplies, > + }; > > if (pfdev->comp->num_supplies > 1) { > /* > @@ -101,13 +105,12 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev) > return 0; > } > > - ret = devm_pm_opp_set_regulators(dev, pfdev->comp->supply_names, > - pfdev->comp->num_supplies); > + ret = devm_pm_opp_set_config(dev, &config); > if (ret) { > /* Continue if the optional regulator is missing */ > if (ret != -ENODEV) { > if (ret != -EPROBE_DEFER) > - DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n"); > + DRM_DEV_ERROR(dev, "Couldn't set OPP config\n"); > return ret; > } > }