From patchwork Mon Sep 25 13:17:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 13397797 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 82835CE7A81 for ; Mon, 25 Sep 2023 13:17:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231235AbjIYNSE (ORCPT ); Mon, 25 Sep 2023 09:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbjIYNSD (ORCPT ); Mon, 25 Sep 2023 09:18:03 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44C7AFE for ; Mon, 25 Sep 2023 06:17:56 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-504427aae4fso5150727e87.1 for ; Mon, 25 Sep 2023 06:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695647874; x=1696252674; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7auSkgezWSL6mQoHeXRixUmeJiJBcJSiSQX0s+bC+Hg=; b=xueCLe+A0tVPe8iQ5lGUtoyuyK8ZJTWH566c0cnvMlEHWS5l6BKCCBV3LGcmaluj+k hxk919XMzNi9uwetRyVCnpCkbaCmoqenIck2naKgi/3WkaHjb5RseUAm58+taVvXed5v DowfNvF0cvUDv99XOTBoIPf1CwRQWllYtmTVNI374kNm0WJheKwDljKcd/ufeJ7xBr+8 BxiKeurnsInolZ6jpuCRAUZOaaTbThdUNDNL3TvrbA+Upe2fz+3m1Qtp5MyGMEzLJaWi 6+GvV7XshZQhRWaODrFIXCKAVIHwUjgJdxZ1xmeixkOI+HYev4LLUSgD4ootsVb3VMLG qOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695647874; x=1696252674; 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=7auSkgezWSL6mQoHeXRixUmeJiJBcJSiSQX0s+bC+Hg=; b=MtJ/3bod+GzNmapvOjugPmQLmkqPKQr8D0E+Y/aLiFtTSmzNJN+uq3bxa4krB+FZA8 N+UpwUC/j3rQEPF6NsbpWf1hEHC/8vd2Wklu0mtXMole25Djv2447ub0w9x03iUGoATF EvC/SzQmd/ns1Wu2s6etGpJrpG81j8FUGjTygEi1KFxCrQYvvrTUr0N00A7O2XYJuCe5 oSK6a7avw1gGJb7UE5+2xaxtA2w09fjfaZeKmZpHvp7gAu20PCFCQT1MdMH/T6kyJ3Qk cXCy5KhCw9N7OYmldBMjoPJmvudEB4iRMxnXGyeFIJUGlyO+ZqwVA7U8lyEiwjz8FdQ7 TpwQ== X-Gm-Message-State: AOJu0YzBbeopIowYAY/jKcLbvSqWAZ9govqcBnqC/TENUtfEKUkVcOkS MN6vrMdyEu6+WqgSd2YeMnBs2w== X-Google-Smtp-Source: AGHT+IEXoUei5lKEdPsc7LZJvh36BS9Wc/8t36M9yrgUxODOFj9Q1mO85xDzs/ts7iRE7KQ08A6DmQ== X-Received: by 2002:a05:6512:239d:b0:500:a93d:fc78 with SMTP id c29-20020a056512239d00b00500a93dfc78mr2876540lfv.31.1695647874370; Mon, 25 Sep 2023 06:17:54 -0700 (PDT) Received: from uffe-tuxpro14.. (h-94-254-63-18.NA.cust.bahnhof.se. [94.254.63.18]) by smtp.gmail.com with ESMTPSA id m29-20020a056512015d00b004fe10276bbfsm1823583lfo.296.2023.09.25.06.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 06:17:53 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Cristian Marussi , Viresh Kumar , "Rafael J . Wysocki" Cc: Nishanth Menon , Stephen Boyd , Nikunj Kela , Prasad Sodagudi , Alexandre Torgue , Ulf Hansson , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/9] PM: domains/opp/arm_scmi: Extend performance scaling support Date: Mon, 25 Sep 2023 15:17:06 +0200 Message-Id: <20230925131715.138411-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Consumer drivers for devices that are attached to the SCMI performance domain, are currently not able to use the OPP library to scale performance. This series is enabling the support for this. The OPPs for SCMI performance domain are encoded in the FW, rather than being described through DT. To better support this, some changes have also been done to the OPP library and for PM domains in general. More details are available in the commit messages. I have based the series on the scmi tree and the for-next/scmi/updates branch, so the OPP and PM domain changes would require acks from Viresh and Rafael to be allow to be picked up and funneled through the scmi tree. Or, let's just discuss what works best for us in this regards. Note that, I am running this on the Qemu virt platform with Optee running an SCMI server. If you want some more details about my test setup, I can certainly share this with you, just let me know. Looking forward to your feedback! Kind regards Ulf Hansson Ulf Hansson (9): PM: domains: Introduce dev_pm_domain_set_performance_state() PM: domains: Implement the ->set_performance_state() callback for genpd OPP: Add dev_pm_opp_add_dynamic() to allow more flexibility OPP: Extend dev_pm_opp_data with a level OPP: Switch to use dev_pm_domain_set_performance_state() OPP: Extend support for the opp-level beyond required-opps firmware: arm_scmi: Simplify error path in scmi_dvfs_device_opps_add() firmware: arm_scmi: Specify the performance level when adding an OPP firmware: arm_scmi: Add generic OPP support to the SCMI performance domain drivers/base/power/common.c | 21 ++++++++++ drivers/base/power/domain.c | 33 +++++++++------ drivers/firmware/arm_scmi/perf.c | 22 +++++----- drivers/opp/core.c | 54 +++++++++++++++++++------ drivers/opp/of.c | 10 +++-- drivers/opp/opp.h | 2 +- drivers/pmdomain/arm/scmi_perf_domain.c | 34 ++++++++++++++++ include/linux/pm.h | 2 + include/linux/pm_domain.h | 6 +++ include/linux/pm_opp.h | 31 ++++++++++++-- 10 files changed, 168 insertions(+), 47 deletions(-)