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: 13397786 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B48DCE7A81 for ; Mon, 25 Sep 2023 13:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zW0exNYllqERCbaNZPsN6Qetf0QaZg/MbBH1zlIA1Ac=; b=UZksrMvt6JlIXT lJrS3YQqOzR+u1LbCL+/Dih08jmEUO9YVkAL1rU6T3fn2oBzMVPp/DNAjO7b72Y7/tsBtDu5sMhJB yKQoaJwwBCiiPv3a+KJbKygVM6KJshg2vYvwSdSs8aIMmVKB3trand0fy10h5JqdPXpLOR5D+L40t fYUIbZp2h1vIOlKO9DABlxe9Ef1iMeQXoY4mRsjvGvnwShtQelmmO50L63DYiSZy75Cd+RB8O9KQI 82HMAY5NFD39RaCsVjrV0bHj7xrAqUNhODe1cyYcF52jKnwEmrkfStoRQ56mG56qoAbcnN9846UsM zVsoXwV0UXBfljizwBWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qklTN-00EJOX-0c; Mon, 25 Sep 2023 13:18:01 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qklTK-00EJNk-2W for linux-arm-kernel@lists.infradead.org; Mon, 25 Sep 2023 13:18:00 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-503012f4e71so9254729e87.0 for ; Mon, 25 Sep 2023 06:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695647874; x=1696252674; darn=lists.infradead.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=hheLJhCevkhyqwK+iTiZhuUcyuUoRrkigATKc4Vyk17lQCiPZAuXqOs1nNPaCePskO WRIMqTDiP+dKwW9s/ro1MfX7UH1hd0qIAaqO5Ipyh2mxFbhpTNjSg8l5+O+OejqeNYne GxYs0JKEfMSLfxNmB0XK/W5VeuCPu8xjBOs+LzKcVX4dQlBestPwLlx5vlfabEtMjUjk zMYUJB9Hg36tEAyDPRrPtt70mFcfEUROX+liAFC9cdG+F9A71g1BDn4wffeXiFSHwtJU hFGfak4RWgQm7ODmIT70ixkBSSOZ13bHrpfumX13MGN4khIeQTKePrnK06dZ4VcvXHU1 JWbg== 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=VgMIbGAgzgKe4qKFbkvE5N2TAmKZKj8kD0p0rLknowjEgYjIqUVILX0Bu3FSQPAksN nCwJRRk+2QnUB5EN6rnvO/KiCQA7uPt+/RJEmfvNeptr1zkZ1645C0sK3emyoiF3Sy4G 7HTakpHrEeI0CE67F/doFOF0DMhKYOh1p0rJmTzk1lmicBUTo7nwaF94nySwtg3OK53s NZBbRyS8kedskw6AJgxKFW0kGBCVQMKRs+GXWhSDrlvAjSqoDznk14apiYidVFP2cpwn 8ECMnvq0Pu12YGDCSe/e7bHSmm10JrrO9lvw+lacaQwBJEJrJBKdSvLvr0GEcMUfj2lc It1Q== X-Gm-Message-State: AOJu0YwKgen8uLE264RkquZnJyqeivswdlF+jGz+8UQ613UHQbZLdP4l CN0xoXUWa/NFw75+c7gJ4R18Hg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230925_061758_850375_ABCCEAEB X-CRM114-Status: GOOD ( 13.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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(-)