From patchwork Thu Jan 21 11:17:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 367809 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp470624jam; Thu, 21 Jan 2021 03:20:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeJQjxIXVbmqZBmcHfvFr6qXMlZngfxqYu4xRWRliCmTbSHKovig9CeK5Y7yI5ug5vy15n X-Received: by 2002:a17:906:dfd3:: with SMTP id jt19mr8804407ejc.64.1611228023207; Thu, 21 Jan 2021 03:20:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611228023; cv=none; d=google.com; s=arc-20160816; b=xF18Q/BGqNmXoM6DAG4Jp0TBpZwhKjAxgv9QzQefuGfFrbaHLdT6yyXLpFZ3X9zlD2 s/aBd3jLgFKM/pUqMW+8N9nm9VSh/4QA7Fq9bojQyZMPVanyTO4Vmq8OqiEQW9kUYaEx NTYvNGKsTOaKrcZ4wTGeXHRf8bxr39nb3EE21D6DbueBRy2ZkguJNahtD4NSk15BcEBv w1dr6KPEJw+4V/2rf7I64qTwIg81bf7+bOUBOj4RDHiLGZSEv+1ncRcv/QLEHQn+GTHg sYyNLnosW1uAg0gV2ClbgWqjbfVa29EgWxSHgky34CPYJTitOMRguHxPYPKF/MwYO0mJ im9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=x3SmdleK8UZBluZ+gLv61IXIdA7ChI0uJ8q02WGnkWs=; b=cCF5xlp1ijzzpG7hO3tP5q9hsS5+qQ4FLV6/xSw0QHeCsUKh0E9kyUsT+XQEMyw+ht 9Ep1NNtxLu8ISqPssFcYDUMIAmCGBOvNwU5v42Yx2KUtFuuFolDY5VG+O0UdUAUykQu0 3vbASHvFqelOXzkTOFQEbgwh3IM8CM3AkJ94QxMAUJ+yWsUXrclsZw0Wnz7LPraUALXs kK+jwAfi2veuRbkYp94PmdFsm0o0Kw7dGPdfq12AemWAl+bl5tolJJn/Y3aFsUN870G8 dr40U1sr2jZGYGP8ezCZTRd6ppBO8c5tbpVaoCCU+mWJKDYxUh++yewXCobQWBgI29+Y IL0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kKul5ID8; 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 z21si1645998ejr.63.2021.01.21.03.20.22; Thu, 21 Jan 2021 03:20:23 -0800 (PST) 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=kKul5ID8; 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 S1728643AbhAULUG (ORCPT + 15 others); Thu, 21 Jan 2021 06:20:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbhAULTM (ORCPT ); Thu, 21 Jan 2021 06:19:12 -0500 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B99EFC0613C1 for ; Thu, 21 Jan 2021 03:18:26 -0800 (PST) Received: by mail-pg1-x534.google.com with SMTP id n7so1171628pgg.2 for ; Thu, 21 Jan 2021 03:18:26 -0800 (PST) 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=x3SmdleK8UZBluZ+gLv61IXIdA7ChI0uJ8q02WGnkWs=; b=kKul5ID8v5TbX97ww+cpfmgrUv3kSKDwJ5+iClldpCxSEMEvh16BW9c99r9D6TxUF/ UJy9U+fbp6GgTXqQAKH2vpfq+OBFaUhJAFtmu2GlHVA0WGpq/UGkkQR9iGMbQoj1Iitv n10xlrNXdq0kiQQIE5ELsxJO+0LGCp2wS9uujRkXF7ZC8F+po6ARY/vc2Wfe1Q2Hl5ea ea/DVLs27iqJz6zMgl0grfTLeQyN5TuTmnmrzme3iilGPe9v/xC35tR/mdM3Bl/HM1qU XZS/WWhF29VdoamNtm9NTJNGg++hLG8LJsFS9ZiaU3Au8PjSKQyPReA9zoIHqr/wIRDf hK1A== 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=x3SmdleK8UZBluZ+gLv61IXIdA7ChI0uJ8q02WGnkWs=; b=ft1lhEjWqes7yNredxIfnmxmCnkEB2vNITumUDpOvgwoN9ABcS6RoEyKqedT5TT9+g EpjUsUPqVeG2Wkg8vNEBYTHBybAYTM8MG/4WzvHX9sNlStqt0vqig7d6vfBrvdf9wxD0 ddkuvk9BXy2rs3aF5mpB6zKyBo+xMFfKJFiH3gODAiXqqlEVkkV/fWdG+Mes6x98VNbo Wk0te9/Qk15KvOYRHlre8FNBWiI9v2TCHa2ZzMubNzLwwgE9ZDnZPJHIoTUaFN/HDy0C O3IpEF/vSB3bbMqA8lmodgLlJ5CQJ5yBSfAIiPGn3M2EMk/gLq32zmzma31kingT/wOC jkmw== X-Gm-Message-State: AOAM533JBh0pSsgyT+tUd0Gj3Bb5iSNx/1ypS9FqsjlcATj8GL0PDDfs UDSNBtFh60Vm/BOYsZJZ65/3zA== X-Received: by 2002:aa7:84d5:0:b029:19d:da20:73fe with SMTP id x21-20020aa784d50000b029019dda2073femr13718975pfn.16.1611227895317; Thu, 21 Jan 2021 03:18:15 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id 68sm5691390pfg.90.2021.01.21.03.18.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jan 2021 03:18:14 -0800 (PST) From: Viresh Kumar To: Dmitry Osipenko , Andy Gross , Bjorn Andersson , Chanwoo Choi , Jonathan Hunter , Kyungmin Park , MyungJoo Ham , Nishanth Menon , "Rafael J. Wysocki" , Rob Clark , Sean Paul , Stephen Boyd , Thierry Reding , Viresh Kumar , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , Sibi Sankar , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 00/13] opp: Implement dev_pm_opp_set_opp() Date: Thu, 21 Jan 2021 16:47:40 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hello, This patchset implements a new API dev_pm_opp_set_opp(), which configures the devices represented by an opp table to a particular opp. The opp core supports a wide variety of devices now, some of them can change frequency and other properties (like CPUs), while others can just change their pstates or regulators (like power domains) and then there are others which can change their bandwidth as well (interconnects). Instead of having separate implementations for all of them, where all will eventually lack something or the other, lets try to implement a common solution for everyone. This takes care of setting regulators, bw, required opps, etc for all device types. Dmitry, please go ahead and try this series. This is based of opp tree's linux-next branch. Sibi, since you added dev_pm_opp_set_bw() earlier, it would be good if you can give this a try. In case this breaks anything for you. I have already tested this on hikey board for CPU devices. To get this tested better and as early as possible, I have pushed it here: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/linux-next This will be part of linux-next tomorrow. Note, all the patches need to go through OPP tree here. Please provide your Acks for platform specific bits. -- Viresh Viresh Kumar (13): opp: Rename _opp_set_rate_zero() opp: No need to check clk for errors opp: Keep track of currently programmed OPP opp: Split _set_opp() out of dev_pm_opp_set_rate() opp: Allow _set_opp() to work for non-freq devices opp: Allow _generic_set_opp_regulator() to work for non-freq devices opp: Allow _generic_set_opp_clk_only() to work for non-freq devices opp: Update parameters of _set_opp_custom() opp: Implement dev_pm_opp_set_opp() cpufreq: qcom: Migrate to dev_pm_opp_set_opp() devfreq: tegra30: Migrate to dev_pm_opp_set_opp() drm: msm: Migrate to dev_pm_opp_set_opp() opp: Remove dev_pm_opp_set_bw() drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- drivers/devfreq/tegra30-devfreq.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 +- drivers/opp/core.c | 314 ++++++++++++++------------ drivers/opp/opp.h | 2 + include/linux/pm_opp.h | 6 +- 6 files changed, 184 insertions(+), 150 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af