Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp682522ybi; Wed, 17 Jul 2019 03:15:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVjJBq01pJdPIaXXPVANo1nVn6KHpMYnVfpKnKSeTPmavTSV2Rv+KVAWpsd17tJFPdikxz X-Received: by 2002:a65:55c9:: with SMTP id k9mr40773949pgs.142.1563358536968; Wed, 17 Jul 2019 03:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563358536; cv=none; d=google.com; s=arc-20160816; b=yFRMyTiib3SmGI4DjFqiN80epvzwSgfvQKyFOBa/MVZqzLIk/WFese16T1VeE+sXOt Y1QmMBUJvlPc6ffTxXylu1G663/+PztwmKnobdiKwCMgBA9FBeRwv/dwzeNWSl9xX6xa O5eqi8praJmFzWx7qpQBrBcgHP2EKZgobO20AexlGlWoMkUfkdJFGESoU4m67/hEXL/w fzHOyvY73vE8E7zi2hYVQ3QDsKBltlsp2PFJ2T3KyqyOYJ5eKrTmmwDRKkcM5RK4eRbZ aPUpJ55IsAMY/yjsiJJptyUKoF1Wfc/1cg6EGdK51VZeUxhoa1UMUgo0zOZWZyfl4w1T Hs+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PrtH8Kksib4dUXTG8vDDfJrfFptIvUSjdQBJsI2iu0I=; b=V+Mif2lGgZjHd9L5DtOmOMf40wRd9TJX8uBxY3a1WPMOPctLO0h4HAMUgNCbA81u5Y Vy3fjoyzBRsA9pKVqXHddkTCp3vYAdVzTD/iUQJiv2el2fAN0UKOsj0u1y4Dof2yhhMw TE87GEVdU9aLc06iSZu8LLjhSaXrMdlJkZpfecJ+4xx+wmdoKSajlvHe/FSSEUZ+yc4Y dJwBqorQnjDzg0aV11XtLxxiznWXU8kIJ8APz5YwVG2Dds/GS07VCTlUBzwCOlZ/GEc+ JO5cF4+X5h+cZ8DnzlxodtKcGaEc/m0WMrbIs2cIwdQ7fD5juiT8TIZy25R0rgA9gZlm 40KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f1LdET+K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id v14si17105587pgb.375.2019.07.17.03.15.20; Wed, 17 Jul 2019 03:15:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f1LdET+K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726844AbfGQKOI (ORCPT + 99 others); Wed, 17 Jul 2019 06:14:08 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:32824 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbfGQKOI (ORCPT ); Wed, 17 Jul 2019 06:14:08 -0400 Received: by mail-pf1-f196.google.com with SMTP id g2so10618175pfq.0 for ; Wed, 17 Jul 2019 03:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PrtH8Kksib4dUXTG8vDDfJrfFptIvUSjdQBJsI2iu0I=; b=f1LdET+KRqIqj9PnA29N8nNQaxzbjiZ1JbKHviB/BsS+AsQOPL4XhHv2A4MUIeQuvc F+gYsmL0JB7hb85aYAftvNVt3oyy64kpgQSawB3nlXdZ9N6/Z+QyXLQHhvMms0O9aiiu NOpnPL6tFJ5HCABcFOMbcFOjP63kP8qNSOlsCzyWQmFyVPDpdL1LUEqRGuuNPKRNP3hD R1uWasEL3FHU1fmMNPabLuVF0rpSlM5z/Di3BmBIh3DA8niPmOkVE4S6E8coh6tbuzcE Cp9i0nNJNQx2wB/pyblAm8KxortM3KD83m5NsqibpBGKyLrKyv5quGCchOTw5kRpav7j giPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PrtH8Kksib4dUXTG8vDDfJrfFptIvUSjdQBJsI2iu0I=; b=OAs1S7/8lsiOp6SkAjh4w0kI/DOxgg/ojKQq3t2Of3/6T/zYfdIrAO7djZ2LeALxGU G1oXkqTDS7v001ikBwcq9J7h8TDCUFFwP6pWxBCpDF4DouluGuYR202FsqIw2DF+BLW6 9Iz84M7g67Ih/hvvUd+q4P+RuBG+EZBmGp3PwHyE/WRk2kEMFLkmk8nkhuv7CGOFqeQH O2qpKqnskN0LHHF2VXi0B/DLk8ARQVbrvahdixiEN26pnvPMQ12flVz77WDWgfqCeYB3 K3XxxrE9OHfngYQNeV9PLw2EK6YRZWVgpQ6WTg59JNjSzhzUM+6yqzURTr6Ac9goE7a1 JMGQ== X-Gm-Message-State: APjAAAVzkrbQdkDSA/xIVgxUIbpSjWsvq5Mzu43/L/GIiV+1eWvcfDwl nNiuHocxUSK2sUurOEd9rTgeCw== X-Received: by 2002:a17:90a:2488:: with SMTP id i8mr42202505pje.123.1563358447438; Wed, 17 Jul 2019 03:14:07 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id i3sm25297361pfo.138.2019.07.17.03.14.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jul 2019 03:14:06 -0700 (PDT) Date: Wed, 17 Jul 2019 15:44:04 +0530 From: Viresh Kumar To: Rajendra Nayak Cc: Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: Re: [PATCH] opp: Return genpd virtual devices from dev_pm_opp_attach_genpd() Message-ID: <20190717101404.a7p5zjweq5m22vf5@vireshk-i7> References: <027985ce35873cd218298302a1408da06d48458b.1562565567.git.viresh.kumar@linaro.org> <2ed7993d-523b-270a-2be9-83ad2426e946@codeaurora.org> <20190717054713.vn65cfiqebhzdvjq@vireshk-i7> <2fbfc0fc-7d61-bf8c-67de-28183d03e26a@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2fbfc0fc-7d61-bf8c-67de-28183d03e26a@codeaurora.org> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17-07-19, 15:34, Rajendra Nayak wrote: > > > On 7/17/2019 11:17 AM, Viresh Kumar wrote: > > On 11-07-19, 15:09, Rajendra Nayak wrote: > > > Sorry for the delay > > > > Same here :) > > > > > I seem to have completely missed this patch. > > > I just gave this a try and here are some observations, > > > > > > I have a case where I have one device with 2 power domains, one of them > > > is scale-able (supports perf state) and the other one supports only being > > > turned on and off. > > > > > > 1. In the driver I now need to use dev_pm_domain_attach_by_name/id to attach the > > > power domain which supports only on/off and then use dev_pm_opp_attach_genpd() > > > for the one which supports perf states. > > > > > > 2. My OPP table has only 1 required_opps, so the required_opp_count for the OPP table is 1. > > > Now if my device tree has my scale-able powerdomain at index 1 (it works if its at index 0) > > > then I end up with this error > > > > > > [ 2.858628] ufshcd-qcom 1d84000.ufshc: Index can't be greater than required-opp-count - 1, rpmh_pd (1 : 1) > > > > > > so it looks like a lot of the OPP core today just assumes that if a device has multiple power domains, > > > all of them are scale-able which isn't necessarily true. > > > > I don't think a lot of OPP core has these problems, but maybe only > > this place. I was taking care of this since the beginning just forgot > > it now. > > > > What about this over this commit: > > Yes, this does seem to fix my concern mentioned in 2. above. Great. I will include your Tested-by:, Lemme know if you have any objections. -- viresh