Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2966395rwb; Mon, 5 Sep 2022 04:33:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR7OMSKzpz3AK7af+zR08IRIS8bzpsPx2T/wvwxDbHJYZvbg1+h5S3vqCiiHDF+T9BdAeZTO X-Received: by 2002:a05:6402:510a:b0:43d:ab25:7d68 with SMTP id m10-20020a056402510a00b0043dab257d68mr42571654edd.102.1662377619882; Mon, 05 Sep 2022 04:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662377619; cv=none; d=google.com; s=arc-20160816; b=i5k8xCnApI4/lJNWF+P0QDf7trLr2wRChbN1EVCfrTQmdrETMeyTl5H6+lq/i36c0J 10mAik8hwHvNGmrjlBpSdy5LAAnfW4NXDjvrBNHQqGgl3MvTlPODfu5hGOXB9s3xUUye zhC1uJfBGVAgZdhp6wVoNx/b90RN2ntE9XyIrHp6SRShw4kUkglsUyv8dJQ2+XbkYzA6 XhWDEQlJiQ4v+BbpdvnkABwYUEYqo4p9X+LAG2tQIcJi6+42y2Fe0j1OCZnRC869ZQ8/ +y9i0K4uRzxBcEiz3sozutGCSeP6jsDAwetbqCWboSBhoBb0jCJ9cHqM27CzJ5/f0+gg 96Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RC1MSKJ91kE9VBSLGcvF2T8FuZi4s6PvS0kJeDsg13Q=; b=da1yiwIPhd4wtcw1i21EQciqzkJBxM+STCXOVzPAXdKZPK35Imj6ewtJzzf0bt19wN SzkRO93Z2GDD5KtuF4qxAVLEh62IZ0Z7NbYZ5wMS2n06wrHQlec/fFeuxLn9jWVX49vn 4tctkusbLCRO63rIuCSeAPMu9O4u37FrFrwwbMCCSKKtqoDhO7yqZseblPhS83j5gy+Z BynFxshhI1Jq0sruijLsUaWRorBW4rSfKzLjzu8YxGco7iOY/ay3yrGFcqC/i5YxQCun iSEAWZou/CqhakNJegZFHtIDiI+isb3jAOdjrDzr1+p6LaWRlqHF1d3NfIFF3mphJxew PeVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rhGk45ZK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020aa7d48f000000b0044e849a6448si1887551edr.494.2022.09.05.04.33.15; Mon, 05 Sep 2022 04:33:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rhGk45ZK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236255AbiIEKZE (ORCPT + 99 others); Mon, 5 Sep 2022 06:25:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236540AbiIEKZA (ORCPT ); Mon, 5 Sep 2022 06:25:00 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73CC913F79 for ; Mon, 5 Sep 2022 03:24:58 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id s14-20020a17090a6e4e00b0020057c70943so2544046pjm.1 for ; Mon, 05 Sep 2022 03:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date; bh=RC1MSKJ91kE9VBSLGcvF2T8FuZi4s6PvS0kJeDsg13Q=; b=rhGk45ZKJN2ivW+NW17AIxS89sPD21k1J61nT2CXdYeiqSrNW2FMzmyvb8zOhEeo7Y 9uLwi6b2hiCjK3GAAcd7D8szhwLFnHosp3R2j0vcK8Pt8blFA6HwjlIPwXjVxiBhcJUI NWHzrSS+MVuLEZE6PmieyZZHbfnoPvyYhZUvhHIJDksRjq5bi44xb7PCDS8g6//zQr3n RWqTELi6y7mc8Jt1TiEAe6Q3ZmuhKfU70vvKQk+dw+kozyHIsJ8sIU6WSatzXORzL4So zdV6fg8A/P9ZU4RunJzpx4Plu2Zzf301YMsBBrU9uXGmjPtwrvtpCckpjOsjPVogFK4+ 0e3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=RC1MSKJ91kE9VBSLGcvF2T8FuZi4s6PvS0kJeDsg13Q=; b=ODvASBpFeTACX4HLj2THZvsmjSnqqwUx5PNN1QCKpWQnt6S31zlj2tsSVWRReAiQu2 5jZwF0DN+acbkx3VUl+IQ7+kA6m0ui7mSuIY5xye0Hfx5GgQi8c0BIsJ6o1fbBzd4Ct/ pTh+bOVrlpqaGA3c8k+P5ePa8KbFHwHaIrodZynSJP8NAdD+wKhGMBwNtsgQQ1L6swbc +7XuB/yukdO9jrHVHi4Aygz6WHl99hXDobXoXetKvkYg7fMTEdiH+W6DlAmr5EP6lz88 LH/dMnRWMSVdW6CE3TMgJB/+X8Nz83aJwGBH23zLlb2zLAmIvQ7yY2Q7p6YO6umYi9DS CfMA== X-Gm-Message-State: ACgBeo0gngC1qNZ0FgCsyDtEk60NdBROrlWd72ssvZymXNgoqopQmz96 UIwStQ8TR3Jwe7roibN6jly2EA== X-Received: by 2002:a17:90b:1e0f:b0:200:61cb:c718 with SMTP id pg15-20020a17090b1e0f00b0020061cbc718mr4729792pjb.36.1662373497952; Mon, 05 Sep 2022 03:24:57 -0700 (PDT) Received: from localhost ([122.171.18.80]) by smtp.gmail.com with ESMTPSA id u75-20020a62794e000000b005382b7c1015sm7376718pfc.182.2022.09.05.03.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 03:24:57 -0700 (PDT) Date: Mon, 5 Sep 2022 15:54:54 +0530 From: Viresh Kumar To: =?utf-8?B?Q2zDqW1lbnQgUMOpcm9u?= Cc: k.konieczny@samsung.com, Marek Szyprowski , Nishanth Menon , Stephen Boyd , Viresh Kumar , "open list:ALLWINNER CPUFREQ DRIVER" , Vincent Guittot , Rafael Wysocki , Mark Brown , linux-kernel Subject: Re: [PATCH 0/2] opp: core: add regulators enable and disable Message-ID: <20220905102454.4f77gyos476lbcws@vireshk-i7> References: <20220905043543.huxq7mmpclto2h7k@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05-09-22, 10:28, Cl?ment P?ron wrote: > Hi Viresh, > > On Mon, 5 Sept 2022 at 06:35, Viresh Kumar wrote: > > > > On 03-09-22, 22:35, Cl?ment P?ron wrote: > > > Today, I compiled my kernel without any program requiring GPU > > > computing at boot. I thought you disabled most of GPU stuff here and so thought panfrost devfreq will be gone too :) > > > This makes the dev_pm_opp_set_rate() to never be > > > called and so the regulator is not enabled before the regulator > > > framework switches off all the regulators that haven't been enabled. > > > > > > Unfortunately switching off the GPU regulator makes my board hang.. > > > > Why does the board hang? I mean the kernel should boot fine with the > > GPU disabled, isn't it ? Or is the regulator shared with some other > > critical resource, or something else. > > The regulator is dedicated to the GPU and the board could certainly > run without GPU, the issue is that the driver (here panfrost) may do > some regular access to GPU memory (I suppose). So we do need GPU to be functional at this point ? i.e. both clk/regulators should be enabled. > The code I'm pointing is panfrost_devfreq_init() in > drivers/gpu/drm/panfrost/panfrost_devfreq.c I think it would be better to call dev_pm_opp_set_opp() after calling devfreq_recommended_opp() in this driver, since you already have the OPP known to you. -- viresh