From patchwork Thu Jul 9 11:07:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 235133 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1297705ilg; Thu, 9 Jul 2020 04:07:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYT5ufQkDA9/PZrlMicvphiJUJ6Z2ffZu/nNpV+96aiJ2UBaSy9jZd7KvIglK1Oov7OL7n X-Received: by 2002:aa7:da56:: with SMTP id w22mr73775116eds.124.1594292832489; Thu, 09 Jul 2020 04:07:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594292832; cv=none; d=google.com; s=arc-20160816; b=f0UA0xKNfcc08EJZhEU3cxt7Ep6Y6tHaZ/0IrLKGPFie4J393qh0xeCE69h8+nt5Ee ch9t+xdmp0+U3Gsz3rF7j6foifWx4RubsTdbv8m+D5ApXmfWZnz+206C/qOIsVDYKScn d8TCxmnaM8ReZtYpIf591aO9p7foMH45UTJ9FxSY8ff/0ia1uuz3IiNePFd00SncLdPy xrNcYtX9UcYB+82d56p7x/QbCWIYnOxLu/syOtXn2gBVmjNQ2jptackP58QqbOERx2DA 9aXpoRWmI3n8BWjIf3msd5a9MK8OHu4LupSxTl/TqSTe7sjJEB5CTKfyRS6P5AUVd/Kq RalA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dj6DLJ5JhwDTZpg1cYa8Jkc5nI2WU1SZemCOoY6JQX8=; b=a4a/yWGhkZV+6bcDKzVAp0xKqViKlAGFNqx+RpPA7GtrOitoVn4jn/5eT4wwUNLDCM rTH7BXxdz0w3WfbZ2fTOc2PgiRH7h4phUCHov0e6chw9wEZRGpHtboZpUAyLiEsFURQF UEfgDnxE9SsvGUCAy+UB2qfv7HiaBDaeDAuk2OuyebuXCPqGzA9urem2ho6PT7+/WzfJ k9tiPpphOU8nZxZOcP6nHkVnwdy8CpyUjDt7178PkTtUvmwOe89s5dPIp9apWrkahuBw 2hqB3ZXOBkWlxeurxmSUnK2tWaqurIIYVH7Q/qpavspOp5IGHJRKqDExMADeiHljFlpr 2L4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OqrgBYRS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ef10si1650110ejb.519.2020.07.09.04.07.12; Thu, 09 Jul 2020 04:07:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OqrgBYRS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727775AbgGILHL (ORCPT + 15 others); Thu, 9 Jul 2020 07:07:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbgGILHL (ORCPT ); Thu, 9 Jul 2020 07:07:11 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B79D4C08C5CE for ; Thu, 9 Jul 2020 04:07:10 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id r12so1855744wrj.13 for ; Thu, 09 Jul 2020 04:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dj6DLJ5JhwDTZpg1cYa8Jkc5nI2WU1SZemCOoY6JQX8=; b=OqrgBYRSXu4WOjIThWIY9Klk6Hlc6dgDpPB9PYoq4FN8And4dQWC6+puoCGj3yaq75 j9q0lGCyqBZQAkZwJg6iiss5/kkNG0TMRYOMDn2LRE9RL0Fe4cbltQomN4Q6xNZ8XM1y re+ahL/J+J6C2CSXl1lvfk3EanLYT8zGvPefqudhF4HJ6ITNyEid5gMvuSetJy9BPj2p 3GgCPuRygIdzH8PlHJiavWAC7FfCR4oIxpqWyH1ppd0AiZBBPlD9OJDYggTka8+Dn1Gi U9VYl73QdCyTZ7t6ZlYL5H95Kky8L+P+kd+nXkQdlWraeb6wVviZK9S6pqLqQjH6EMp4 hu/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dj6DLJ5JhwDTZpg1cYa8Jkc5nI2WU1SZemCOoY6JQX8=; b=fweg3ttzmsUbV4lWdFpsEkMdZO+qe4ST+3LpJDI5pO4S/gUjvjGQcVw/QWoiJbeWwg ojRw0RMYDTlCgbdq3iPuldZcY+7VYKExuGXWTlf7OLU7MtIWZsxNr3Bv0RGKCAzboJJ6 UmeOlimziAZm4FmWatKPYY3dLRkUXa8ex160XGrv9y/DALa0PfILvHjrKwDxcMZtYYQ9 3/N53CndiIygS/Je2la0hmw0vYEA9LFdEtgvo3xdqdep53KVy4HosxawZj7BWuXo68Ph 9AdmdfluNCOrlihOEjRBd/VwK0D6KT8k872+HIEVc6qtejLtetstT2RSgj90lvEfS4YL CvoQ== X-Gm-Message-State: AOAM531VbSRZ0ZTNO+eS61r9JUcEQ6k8Wy2tmxjfUL+JiXfOgHQeaNni mTf3n4tsnZ2ymUm+e+Xqqug+Lg== X-Received: by 2002:adf:cc85:: with SMTP id p5mr61842492wrj.273.1594292829308; Thu, 09 Jul 2020 04:07:09 -0700 (PDT) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id q7sm5375578wrs.27.2020.07.09.04.07.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2020 04:07:08 -0700 (PDT) From: Georgi Djakov To: linux-pm@vger.kernel.org Cc: saravanak@google.com, mdtipton@codeaurora.org, okukatla@codeaurora.org, bjorn.andersson@linaro.org, vincent.guittot@linaro.org, georgi.djakov@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] Add interconnect sync state support Date: Thu, 9 Jul 2020 14:07:01 +0300 Message-Id: <20200709110705.30359-1-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Bootloaders often leave some system resources enabled such as clocks, regulators, interconnects etc. We want to keep these resources enabled until all their consumers are probed. These resources are often shared, so we must wait for all the consumers to come up, before deciding whether to turn them off or change the configuration. This patchset is trying to solve the above problem just for the on-chip interconnects. The problem is solved by allowing the interconnect providers to specify an initial bandwidth value, which is enforced during boot as a floor value, while the requests from all consumers are being collected. Then the sync_state() callback is used to signal when all consumers have been probed, meaning that the floor bandwidth is not needed anymore and the framework is ready to re-aggregate and process all requests. Georgi Djakov (4): interconnect: Add sync state support interconnect: Add get_bw() callback interconnect: qcom: smd845: Use icc_sync_state interconnect: qcom: osm-l3: Use icc_sync_state drivers/interconnect/core.c | 57 +++++++++++++++++++++++++++ drivers/interconnect/qcom/osm-l3.c | 9 +++++ drivers/interconnect/qcom/sdm845.c | 9 +++++ include/linux/interconnect-provider.h | 5 +++ 4 files changed, 80 insertions(+)