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=-11.6 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,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 29744C433EF for ; Tue, 7 Sep 2021 08:10:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05E3260F13 for ; Tue, 7 Sep 2021 08:10:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241887AbhIGILX (ORCPT ); Tue, 7 Sep 2021 04:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240530AbhIGILV (ORCPT ); Tue, 7 Sep 2021 04:11:21 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3657FC061575; Tue, 7 Sep 2021 01:10:15 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id k13so17968058lfv.2; Tue, 07 Sep 2021 01:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=MDKgUOk2Pvmf4N3Pomrnd43ATp9QvOvkpc8abXhpJGA=; b=kzlGW1FVA3CuNStZtvaE20V1sOQa0IYU9cCB4qrfCClNymYG4f7V0eaFYXL8WccOIX 5K6ne2ETZaHeusrSSzUcjhOfScSUieYysTqg/daw62pJuPHSth/pUbEdZcDv42f0++kc YHM221/PDW26cbrUXnuzAobWpOyRJRk53qusfYWtegEZHVK/N/p2IbdOSUBqGcKFB7s3 /s2is53JMbkv3fyQKmLlxqZj0vcPw1qYoYYWuzgbD5X7lHWf6K4QnwKQz3WBCZmq2oIm 2RjW0gWGdhSOXsYteG0YTV1mrjfwgMaLi+/JPJafgNxUV10yAO8OANezaK1T1pMmWEtY SPVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MDKgUOk2Pvmf4N3Pomrnd43ATp9QvOvkpc8abXhpJGA=; b=ImyF3XjiEzljAmmaU5DA+LE+Cen82tK0jkXqZ/saf9u+HU1FBI2VEmo1yec4MCavCn Z6uFNQ/KRLwZqq5uor1fojRmaLLWyXap5SuxakxLaCg4VHJJ8fGEKHDDRUDZlyLedpSm 3L+Beih+5jkpVCa7MBtBbrqEnJFRA997GzNc5/QrSMNepZJ7oV8U+aNXHtZ6Gt4ks3GK tCaMiMjk6XYhAnInfZr6DtZdGL8Hxc02Lkd71cKg0M/l/knURo1wGhwVPBl68N/mQYvo iPtnG0DD1ewQ8iJo4oxoT7KIQHqBNd6FlV+Qbb1A7pVtg2aLbcrr8BJ5rrWAPr44/yhb g12A== X-Gm-Message-State: AOAM533pJ5+f3A1qLzF1AVlvrbyb+LVsgI4zgfpg7bPSVsTFI2C6XrZm lP0jAbLeDhihPrFlrZhcfdB9c+jttwo= X-Google-Smtp-Source: ABdhPJym3ofWIRZH2bvkuRXPkEnN/luDUmyRz4c1dwHVPc4pNqqXlkbVa5MRAVxwzIf+FTY8oqa25Q== X-Received: by 2002:ac2:5d45:: with SMTP id w5mr12129021lfd.642.1631002213380; Tue, 07 Sep 2021 01:10:13 -0700 (PDT) Received: from [192.168.2.145] (46-138-3-129.dynamic.spd-mgts.ru. [46.138.3.129]) by smtp.googlemail.com with ESMTPSA id r7sm1012772lfr.60.2021.09.07.01.10.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 01:10:12 -0700 (PDT) Subject: Re: [PATCH 3/3] PM: domains: Add a ->dev_get_performance_state() callback to genpd To: Viresh Kumar , Ulf Hansson Cc: "Rafael J . Wysocki" , Linux PM , Dmitry Baryshkov , Jonathan Hunter , Thierry Reding , Rajendra Nayak , Stephan Gerhold , Bjorn Andersson , Linux ARM , Linux Kernel Mailing List References: <20210902101634.827187-1-ulf.hansson@linaro.org> <20210902101634.827187-4-ulf.hansson@linaro.org> <4e36e732-6ca3-1d00-e6dd-38bb8877577b@gmail.com> <1124dae5-478f-f0ca-ea91-b6945f7c9254@gmail.com> <3d92711f-ce30-2c19-c6a4-bb77d32df2dd@gmail.com> <20210907034038.ncx5nas6mhrk4u3r@vireshk-i7> From: Dmitry Osipenko Message-ID: Date: Tue, 7 Sep 2021 11:10:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210907034038.ncx5nas6mhrk4u3r@vireshk-i7> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 07.09.2021 06:40, Viresh Kumar пишет: > On 06-09-21, 17:35, Dmitry Osipenko wrote: >> Viresh, are you okay with going back to the variant with the >> dev_pm_opp_sync() helper? > > I have missed a lot of stuff in between and wasn't following this > carefully as I thought my half was resolved :) > > Can you describe what to propose to do again ? From what I remember, > doing this one time from probe() is okay, doing it from > suspend/resume, not so much. Hmm.. actually, it's not a problem to set up the performance state from probe() now with that recent change that was made to the PD core. [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3c5a272202c28c1f9309566f206ba40787246149 And then we indeed don't need neither the dev_get_performance_state() callback, nor the dev_pm_opp_sync() helper. The devm_tegra_core_dev_init_opp_table() already supports performance state syncing, so I will just need to call it after the RPM setup made by consumer driver, allowing PD core to set the rpm_pstate. I already gave it a quick test and it works perfectly. Ulf, are you okay with abandoning the dev_get_performance_state() callback? We don't need it anymore.