Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3993294rwr; Mon, 8 May 2023 00:52:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4COM3cCU1Lt/vaW4egzhhQi2QsiFpgjqefc+ZpDSfu26aLvF2W6giqzTFIZ1Fd496KMBpK X-Received: by 2002:a17:90b:85:b0:247:a3ed:63b3 with SMTP id bb5-20020a17090b008500b00247a3ed63b3mr9771658pjb.31.1683532347754; Mon, 08 May 2023 00:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683532347; cv=none; d=google.com; s=arc-20160816; b=Cw4RdYco8GncfQwlxqdoqCWpFEj0Jpoo4eyRJB4HokWwOq9pUK8P+qvx/EV9LoNddO VAst5v78HsDXo27HMvmdaEzAxORwe3XfviFifmCPoCMl3fX+BeNYjGQXHpVYg+gvxYwO E/PJ7rh7VrDMCpEv3zsM/fkzU3ddCbYrMlDnJ2gG23og36ckb94/zXsRETfia5i0L+I6 GSa8BpewMJSx4O74VqdisV+hihE77LWsDdc8KerbDPTb6ESnwDn0i1r5djgWkJUCPCtT n4cEk4eZy1FPhnymv48vNlWSHt60kXvT/KWtIfkuO2p/W4eaecdDiPsFqT0FvMnhh7sz 3dTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:content-language:references:cc:to:user-agent:mime-version:date :message-id:dkim-signature; bh=TcajkMFg+Ijs1is/I9T3sNOP6ZgzZEyX3QOUPBnk/dc=; b=nxMs6/uor+O4jFg7WWpQYJCSm+PVUTubKJUff/Vri53R2ziI/qNwLh96DjMM41gp8S X+B+/OVfP3oVXuwNPP9osSKv02rzbz6yIv2A6z+FtK15Fz3fSxBkgosvr1x+WTQC13k0 /Sli8K0mAaoDhvhilAIJNiL5L+YPtr3Ov4s151sGqlJPBVcF2+/kQEOkr4GID/UUklGz sR796oOVPLU2hxq+KYVZ/skdbN+fU+BfHmbh7RaDRz/+l3SBNdwPjy7rB6lXCFZqrLmm zs2m3yPCx+q62MfsqMVPyYbK7XbPeupjZJGRSNyv6OPYN4o0NLHXEmLQ6nYC8Nikkhm+ p3tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FC6fI1Ki; 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 gw18-20020a17090b0a5200b002470ea7f67fsi12015592pjb.3.2023.05.08.00.52.13; Mon, 08 May 2023 00:52:27 -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=FC6fI1Ki; 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 S232753AbjEHHX0 (ORCPT + 99 others); Mon, 8 May 2023 03:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233207AbjEHHXU (ORCPT ); Mon, 8 May 2023 03:23:20 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EE0459F1 for ; Mon, 8 May 2023 00:23:06 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f24ddf514eso947694e87.0 for ; Mon, 08 May 2023 00:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683530584; x=1686122584; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:cc:to:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=TcajkMFg+Ijs1is/I9T3sNOP6ZgzZEyX3QOUPBnk/dc=; b=FC6fI1KiPdx+e67WHc+0iGmLtivABnz8MrKkTMaTy8j2fSHT+89HwVPiRw3bAJNrC/ 0j65IwEydYg9NiJdl6qFH6PugeMwIlaXzKrjo1BLAZ+C/pI9LCROGvwJ0lydfoPSfle8 ovKlA53T47amHxIk7ClUN4x5vmxO2eTTX2q2G53oBDH6wkuj8mmoA44p8YuHjAe3HDNY 04zKaWmQpSuvlAiybds3j7cC+yVVy+27Jl9TE+mD9ZpYTo7f1r9j8ttYPKpN8mzI4dag ZKPLv93zUHVRQc4nDHGDB6B5wE9w/AsjCpzWR2YJk7j8hSNcltTfSFafL040x2RrgHiz dlXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683530584; x=1686122584; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:cc:to:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TcajkMFg+Ijs1is/I9T3sNOP6ZgzZEyX3QOUPBnk/dc=; b=QO6CSXXDzuZboyAnoKWEz2MXIB45ASlciYgZd04GuqHCG2gK5D/SVl7Yo3aNvp56PU SpMtudeDfDmeBBA1B46fhOH1vee75XrpBivtDppQaaeFk9X5Howk84BmXZZb4wUtPqPN /9Q6tTM1pA809VUHV1Oim4MvI7O2YnPCRBoYH9Rzq99KGwTbvElcJ32jsMdU0WbeuiHF E/Iia22eUaCz8RqnKAnG2fhp6HmTEQQY8QIe5NEB3yzzjEuFLwO7OguxR4TrN1pwOToB pbegYVkO9ZDgIOL+41TzWdgP9Khq3F3ZdTs/WDOK4DFNI1lO/u9j6XTcNIKrWZmaUILO aJhg== X-Gm-Message-State: AC+VfDz3t1b1Jx56HQ+6Nc7n5KBZMpHq8ZoltkL+XkvdPXYRC/BLlhl7 0JF+3okiXW/VyvW33Gfa//4uLA== X-Received: by 2002:a19:7016:0:b0:4f2:4d32:9b62 with SMTP id h22-20020a197016000000b004f24d329b62mr995245lfc.20.1683530584507; Mon, 08 May 2023 00:23:04 -0700 (PDT) Received: from [192.168.1.101] (abyl248.neoplus.adsl.tpnet.pl. [83.9.31.248]) by smtp.gmail.com with ESMTPSA id b4-20020ac25624000000b004f127652954sm1187107lff.184.2023.05.08.00.23.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 May 2023 00:23:04 -0700 (PDT) Message-ID: Date: Mon, 8 May 2023 09:23:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 To: Luca Weiss , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Bartosz Dudziak , Dmitry Baryshkov Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230506-msm8226-oxilicx-v1-1-52e34b94ff22@z3ntu.xyz> Content-Language: en-US From: Konrad Dybcio Subject: Re: [PATCH] clk: qcom: mmcc-msm8974: Add OXILICX_GDSC for msm8226 In-Reply-To: <20230506-msm8226-oxilicx-v1-1-52e34b94ff22@z3ntu.xyz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 6.05.2023 23:20, Luca Weiss wrote: > On msm8226 we also have OXILICX_GDSC but we need a slighly different > config, with a .cxcs defined for clock but with no parent. Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and to achieve that, we sometimes define it to be the GX's (also implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. Roughly speaking CX powers the "GPU hardware owned by the broader SoC that may not need the GPU core clock to be up" and GX powers the "GPU hardware owned strictly by the GPU that needs at least some GPU clocks to be enabled" Maybe 8974 simply has a bug in the driver that would do the reverse? Could you (and perhaps Dmitry on his shiny new 13yo board) test that theory, preferably on both SoCs? --- a/drivers/clk/qcom/mmcc-msm8974.c +++ b/drivers/clk/qcom/mmcc-msm8974.c @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { .pd = { .name = "oxili", }, + .parent = &oxili_gdsc.pd, .pwrsts = PWRSTS_OFF_ON, }; @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { .pd = { .name = "oxilicx", }, - .parent = &oxili_gdsc.pd, .pwrsts = PWRSTS_OFF_ON, }; Konrad > > Signed-off-by: Luca Weiss > --- > drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c > index 4273fce9a4a4..39ee3953567c 100644 > --- a/drivers/clk/qcom/mmcc-msm8974.c > +++ b/drivers/clk/qcom/mmcc-msm8974.c > @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { > .pwrsts = PWRSTS_OFF_ON, > }; > > +static struct gdsc oxilicx_gdsc_msm8226 = { > + .gdscr = 0x4034, > + .cxcs = (unsigned int []){ 0x4028 }, > + .cxc_count = 1, > + .pd = { > + .name = "oxilicx", > + }, > + .pwrsts = PWRSTS_OFF_ON, > +}; > + > static struct clk_regmap *mmcc_msm8226_clocks[] = { > [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, > [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, > @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { > [MDSS_GDSC] = &mdss_gdsc, > [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, > [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, > + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, > }; > > static const struct regmap_config mmcc_msm8226_regmap_config = { > > --- > base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 > change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d > > Best regards,