From patchwork Wed Mar 29 19:17:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 76770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp636356vqo; Wed, 29 Mar 2023 12:23:54 -0700 (PDT) X-Google-Smtp-Source: AKy350aRQpA5PwNETaFd+RCB5fnA1fo+PQE4fTTizWkfu2ItaArE3cfjvPcom9sV9ne1WaPnVpMx X-Received: by 2002:a17:902:e74e:b0:19e:6b50:e220 with SMTP id p14-20020a170902e74e00b0019e6b50e220mr22761199plf.53.1680117834677; Wed, 29 Mar 2023 12:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680117834; cv=none; d=google.com; s=arc-20160816; b=kk1o/UxEwf3XHY6+XXjZ6+g21KIs5uAz3G0tqXI3MkQOrcyXI/RARV/e0kuNtAcLvi vBJnroad6l/awEHWy3npxqR89zc6PL+7RFAKIZG6lfzsiH3WAspzIuvFRcnFSPxVWRhr hdofcqU/U3bTcnk8UoVP7ZLUbbrUFayU5UNYsIi+ObCY1/NJ9sfDVfaBrqJvHhlAsE/4 0MnokRRS9AN6ievTp/vvgMlW482lZ2/thVOPTNO8R4yfpfF80oiRELf2iQr3z5XfjxQw ksq3fYu5ZQmHlkkWiNUSk+K14hcg0eEP4VwjnpuHCZjSg9nB79WDrkneXx09lmig81yU E82A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=FkAai3XhfiUPRhW3jICgZ5p+Oa8ltVSaTnDmaflq7J0=; b=Cn/20x48qhv9aMHPXgWqmc0VAakGgJN4cXefhu0a7Ud/SfNjtTMuuOyL7vyHxIZZ23 b434i2KflkX5bd4DExPB3mYWGUUAETtlK+cxT2ykuadW8VGaz1dd51ugNq5+oncE6KlG 2oTOpDas/WKIOaswdYJTBpUkFU5c4+3qiIzxAYT4rK5BcKbkBj/ctQm6UMNT1WflbQDN 04gFnop3PzVys4TMuOw4dUknpsVLYrxmiKWONm3km1xtD2ug5L+c+AKTXyb3i2Bl4u3U 1O6i5QMDu4ityRBRajZoTeYYlAu5CI+4gFyGxZJAKKqw60RAefIOSEpCxaIjEj+N1BVM fNVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h2ZHVxfV; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gv2-20020a17090b11c200b0023f59037719si1944911pjb.98.2023.03.29.12.23.40; Wed, 29 Mar 2023 12:23:54 -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=h2ZHVxfV; 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 S230289AbjC2TRz (ORCPT + 99 others); Wed, 29 Mar 2023 15:17:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbjC2TRv (ORCPT ); Wed, 29 Mar 2023 15:17:51 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19B36A6D for ; Wed, 29 Mar 2023 12:17:40 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id q14so17267384ljm.11 for ; Wed, 29 Mar 2023 12:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680117459; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=FkAai3XhfiUPRhW3jICgZ5p+Oa8ltVSaTnDmaflq7J0=; b=h2ZHVxfVjRCAHLr2IjDjiLbFb1+cBIYfc9aUZq26bTziEOKuyjCvaNzR21aZpshJhl 0z+e7glfFGvqF5p1LyX266gHOECuCV5VIl8TpbA4Oe8pAU5FbdZKGj6YslqmUY6Vg72s gKagz4V0V3xNGEt73Zy5sk27tYRs8YmoqdEd54ibxlMgObc3z6UExRkmb2jFdYoE9128 E2Y+oCYj7e5VUy+PzyI4bp46j+blfd8pFoQllSitaF4g5rFfndNK6koBJtEsmudItEHf a2n+1CHR+0H0+PKkD4mHX9B3DOK9+MuwcJI5XLl0ylGSY4Ca5TmOm8M0sy7eqw+6exWd 6fZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680117459; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FkAai3XhfiUPRhW3jICgZ5p+Oa8ltVSaTnDmaflq7J0=; b=AVn9BQPs1+/GfvKdUHSA7af0Hk3XZTnWk9DH/H43I2N8SLGxWn4tQREki3CaykMCnY LtZ3fWG3KLV6l9Ol1JUWEtu0OMt4BuEe6iXGjTyIc1Y6svBEHTiQueTTCFNjLbXUvQkw I0Y+kLyl4EHc39Fqdr1Mj7zQDiBIJjS582Im/5pC2MKdgiiLu4guJZQDCnR+f/jkUC5B inM7edOnBbEDILNbB9pPHfERXRKe5FlTDx4hd/HuA4i7/Sb1qyvRKjmW5tkTEMUud4gy nG0bJ0xKkqWrYwIf1Fx5UAuGJCeH8avsXzyFj204d+TqN0MEUlKTqGzMIfrZPC4SJFzD 2LBA== X-Gm-Message-State: AAQBX9f5ldAKZ66cIui0khpPijJv+v8NOwh0kT/XlsmAzvAd8n8USwyo gRoFfrOgsw4H9gJzU2yQjmmVgQ== X-Received: by 2002:a2e:6e16:0:b0:2a6:1682:3a1e with SMTP id j22-20020a2e6e16000000b002a616823a1emr107837ljc.31.1680117458981; Wed, 29 Mar 2023 12:17:38 -0700 (PDT) Received: from [192.168.1.101] (abxj225.neoplus.adsl.tpnet.pl. [83.9.3.225]) by smtp.gmail.com with ESMTPSA id f4-20020a2e3804000000b0029ad1fc89b3sm5189658lja.60.2023.03.29.12.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 12:17:38 -0700 (PDT) From: Konrad Dybcio Date: Wed, 29 Mar 2023 21:17:29 +0200 Subject: [PATCH 2/4] arm64: dts: qcom: msm8996: Pass VDDMX to gpu in power-domains MIME-Version: 1.0 Message-Id: <20230329-topic-adreno_opp-v1-2-24d34ac6f007@linaro.org> References: <20230329-topic-adreno_opp-v1-0-24d34ac6f007@linaro.org> In-Reply-To: <20230329-topic-adreno_opp-v1-0-24d34ac6f007@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Jordan Crouse , Srinivas Kandagatla , Vivek Gautam , Vinod Koul , Rob Clark , Stephen Boyd Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Gross , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1680117452; l=1874; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=B4c/XI1szXxzRjFxiQx3VjZCHnPxGxqsOILu9llcN2Y=; b=Zs9LksiWRztnXYtI4O3NfXHgKmEahbtvCpXjg3ZG98cB1u4HUyqw+s4VmKtPstHhnnUov1foxpUk RR4OCGrFDyd3G9norJZwh8qiAX82Ny9DXokCHV9hL/kqR5rGpXms X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761731238261718274?= X-GMAIL-MSGID: =?utf-8?q?1761731238261718274?= Since power-domains is used for perf_level pm_genpd scaling, it's only fitting that we pass a power domain that's actually supposed to be scaled (and not only turned on/off) to the GPU. While we don't quite support CPR3 yet, the next best thing we can do is pass VDDMX, so that we're at least guaranteed a reasonable vote on the memory side of things. Do so and leave a note mentioning CPR3 PD should be used here instead when support is added. Fixes: 69cc3114ab0f ("arm64: dts: Add Adreno GPU definitions") Fixes: 3f65d51e9e22 ("arm64: dts: qcom: msm8996: Make GPU node control GPU_GX GDSC") Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 4661a556772e..4dd37f72e018 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -1228,7 +1228,8 @@ gpu: gpu@b00000 { interconnects = <&bimc MASTER_GRAPHICS_3D &bimc SLAVE_EBI_CH0>; interconnect-names = "gfx-mem"; - power-domains = <&mmcc GPU_GX_GDSC>; + /* TODO: also scale VDDGFX with CPR3 */ + power-domains = <&rpmpd MSM8996_VDDMX>; iommus = <&adreno_smmu 0>; nvmem-cells = <&speedbin_efuse>; @@ -2254,7 +2255,13 @@ adreno_smmu: iommu@b40000 { <&mmcc GPU_AHB_CLK>; clock-names = "bus", "iface"; - power-domains = <&mmcc GPU_GDSC>; + /* + * We need both GPU_GDSC and GPU_GX_GDSC to be on, but the + * power-domains entry under gpu is occupied by the scaled + * voltage domain. Since GPU_GDSC is a parent of GX_GDSC, + * we can simply pass GX here to turn them both on! + */ + power-domains = <&mmcc GPU_GX_GDSC>; }; venus: video-codec@c00000 {