Received: by 2002:a05:7412:a9a3:b0:f9:93eb:408e with SMTP id o35csp11059rdh; Wed, 20 Dec 2023 20:36:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGxmiCymWAQrWS6c6iyNgNq+lVcVpBufXiOdXa/QhiZJw8Vk19UsUlZp+atlbwV/9x+gYT X-Received: by 2002:a50:ab50:0:b0:553:63af:43df with SMTP id t16-20020a50ab50000000b0055363af43dfmr3037783edc.6.1703133397322; Wed, 20 Dec 2023 20:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703133397; cv=none; d=google.com; s=arc-20160816; b=j0C5nHG+aB88jcdehGA4CxQII39+8NvRNfofBfgEyLE5aDVomVYCtFSBmQKQ5D+dVJ zps9guMTAjMcmscwKcHxzLXg+VKbe5/TptfjM/Dsk0iAHJXWrqtTuk/NaZqJx5jdMM8R 5aNl3WNGfl//NNjWK/vBYmIC0mylL8sM51SdRi55tBnTeG5cBvCJp8OQVISjmSZhlywH m1UahxYFoYGOnNUj9nPVFfV4Vb24KIucQkBBPoEo1KjXP5qAioKRhCWtEqlUpyBU026F rSRsOesl0hExRAhtVlZQDl8Np+V81tY+4YSYwOswaCKWC879dsRCGu6iOFS1OqRtK4dl gXNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=NgiDBfkfVh2AH7jGRDfoS0z7v8qmWn39UlvutwFrbcI=; fh=zdPEDCzuocN2CZ0otiKY+CsEMmGCGedY5D+YCE1V3z0=; b=yTfvKQ3+jkWiu5EyVP9gYT9fyMoBMNFYsWoYpNEUFJgzPsz+xo6Eto2wYRcVCrMbaR JFqAVZ8JSj7yu81FSFgMtsHXEYKJBK24Yn6XT2x1mqYpQCynCbSIe02BcrKPfE4mx//w mbZoiaxWSAlZPBpzia/L24EKc8cB7R+1Cuebhdp4PL1qhh+W5I82PY1jCPmUbd9uP6fE zal/9VK5zP6Cxt7qVjV1aCeCxwb0ZTIssU5Cc9pBIHFAdFJWcqQVh63oErbphmjMbemM E1ZGD7yE2kTlZkdTKLC4ejqwMY6v5c3JW59CftQKKuIBIFPz/bN1peFPphu9ZD3TbNmb JhVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PudtbnkL; spf=pass (google.com: domain of linux-kernel+bounces-7838-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z30-20020a50cd1e000000b0055410efe35fsi380742edi.445.2023.12.20.20.36.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 20:36:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7838-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PudtbnkL; spf=pass (google.com: domain of linux-kernel+bounces-7838-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 176031F2316D for ; Thu, 21 Dec 2023 04:36:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC4588F4F; Thu, 21 Dec 2023 04:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PudtbnkL" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 039CBAD31; Thu, 21 Dec 2023 04:36:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EA1DC433C8; Thu, 21 Dec 2023 04:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703133385; bh=Ye0z8hSnZkvGRVITl2wlNpanlqLTvzdlfbhdatzGoR4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=PudtbnkLI0SC9Z0NDsUUSzMU0ipAjqo60oSzraQ7xsNN3sdgdBZAAUxAiLxBLQcxm C3r9vtGIiK4fwmrQce1zVRLHaZD+6R1nASG367QBQV0YIgHS10p7UUpjKFcOP9fhuV M0dPvCvdsLHf3kD/dx9weNUjr8R575aiZvYX27vMePLLepvRuWwrXz6BsR6fDcHTll Lanq0JZV+JeXdzeAQRndBdLNx2P02z2ViR6g1fozSAe30hXvqka96EGodMSbJzaWYM P+2XObkg0V6nk0JfnilGyuUV2PZLi6oaBTdKjRsZL59k89Nbsgf1GWNO+sYPOdVqPA lHZkPIkJ7EDtQ== Message-ID: Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20231220-sa8295p-gpu-v1-2-d8cdf2257f97@quicinc.com> References: <20231220-sa8295p-gpu-v1-0-d8cdf2257f97@quicinc.com> <20231220-sa8295p-gpu-v1-2-d8cdf2257f97@quicinc.com> Subject: Re: [PATCH 2/8] clk: qcom: gdsc: Enable supply reglator in GPU GX handler From: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjorn Andersson To: Bjorn Andersson , Bjorn Andersson , Catalin Marinas , Conor Dooley , Johan Hovold , Konrad Dybcio , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Taniya Das , Ulf Hansson , Will Deacon Date: Wed, 20 Dec 2023 20:36:23 -0800 User-Agent: alot/0.10 Quoting Bjorn Andersson (2023-12-20 19:50:36) > The GX GDSC is modelled to aid the GMU in powering down the GPU in the > event that the GPU crashes, so that it can be restarted again. But in > the event that the power-domain is supplied through a dedicated > regulator (in contrast to being a subdomin of another power-domain), > something needs to turn that regulator on, both to make sure things are > powered and to match the operation in gdsc_disable(). >=20 > Signed-off-by: Bjorn Andersson > --- > drivers/clk/qcom/gdsc.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c > index 5358e28122ab..d1139c895503 100644 > --- a/drivers/clk/qcom/gdsc.c > +++ b/drivers/clk/qcom/gdsc.c > @@ -557,7 +557,13 @@ void gdsc_unregister(struct gdsc_desc *desc) > */ > int gdsc_gx_do_nothing_enable(struct generic_pm_domain *domain) > { > + struct gdsc *sc =3D domain_to_gdsc(domain); > + int ret =3D 0; > + > /* Do nothing but give genpd the impression that we were successf= ul */ Update this comment. > - return 0; > + if (sc->rsupply) > + ret =3D regulator_enable(sc->rsupply); > + > + return ret; > }