Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp583734rwe; Thu, 1 Sep 2022 04:49:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR7QhyNXOx+yRdNk/VtRtJa8j5jj/izSySBXS7rRdDowaNc4utAt5Enjy70kWroHBOydMEJf X-Received: by 2002:aa7:92d8:0:b0:537:acbf:5e85 with SMTP id k24-20020aa792d8000000b00537acbf5e85mr30441007pfa.61.1662032980375; Thu, 01 Sep 2022 04:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662032980; cv=none; d=google.com; s=arc-20160816; b=kNXQlJJzHlvi7VPV4/GeoZWYIDleObp9lh3p1HagLhvSYQwh+JEUXM5wN7fp+a7jLV uvw5FOyoUNrOdWpyrvY6dtciU01CXsO4tRuT5xx8PX0ibR2VB+xQBzBOx24f/dADY7UJ iIQBNksvqOshDjPO1VlDZRlnrZ/7rmZEde1+ClnDElNnaYh52Rix+SyYlUVe2UFxoJZN 0+68SyYZMPwmcH2O6yXtJVaVo8ElRXibFiN/4fLwgdy5Je9ggB92re+0+F2MHey2Z5Le j0jh1Ec8LM3iwa+1dpBiseMUcDWXirdRHFk25xbH5SNg7SPHdWQOVgPoVwpchUHk2a2k Equg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=q7GfTDbztJBtRyiLzAqPadkhGM0mICn7vR8np4hSo2U=; b=Mc64n7MbXwj5SS3V0YXkSaNaIHko+p0FsEsIE+pplUuT+QZn8zyJxjMVBpe3p3det8 +5j9sfu4BZQtQWpyK84DW113T20ucmkVrkr4rhzvesbD4YQU90IOla5Zz00ENSd6MnP0 81TRZm9kZb629lch/xdcgGcMK7VJhTjlTiQgC+qeRjXV27ZTREctVk01Sh41Y7VZaylD qRONUN1LvSHMr8XCrnNb0xfrerc8C4ZlS0svZmQk47q5ArKZftC/MzBJ5mPBKVt1txq0 NOrJVk6+WgCKfK78H94UXihuQ6J1RHPXKZXM9z8cILX4UZHa3yB13fobRSwGdKZH1Byi /jJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ja3k4IT1; 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 a32-20020a634d20000000b0042c7a2d0196si7574041pgb.484.2022.09.01.04.49.27; Thu, 01 Sep 2022 04:49:40 -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=ja3k4IT1; 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 S233562AbiIAKqp (ORCPT + 99 others); Thu, 1 Sep 2022 06:46:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232771AbiIAKql (ORCPT ); Thu, 1 Sep 2022 06:46:41 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA3DA74BA6 for ; Thu, 1 Sep 2022 03:46:39 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id p16so5785207lfd.6 for ; Thu, 01 Sep 2022 03:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=q7GfTDbztJBtRyiLzAqPadkhGM0mICn7vR8np4hSo2U=; b=ja3k4IT1AJG3cTCogL7Ah/V1RQRMAVc58+3EPHiTIgJpWylZ6l9lvyybcbBMtwi5ja k58U2jE80elsd8XkoJS2GhgxfxkdJUehErE0PfH+5xVMcqZYvJSiEW9Nx+BC8zSpBHRL VaaJE9+ODRL9JTue5gYdc2KC9nJ9q8XGBE89uyVYg+iMqRFS8UPg3Sw0Mza6SzFxt+po BeEUF+igPo9ys7LxA1p4qG2/DZskUpLsee36hl2L0o+33KJNDCuDNDOuWY2sviZX17gd FvlQqJI1fZdUyJmO6l9DS1QgBTUpB7s0Y6iYalWWhGng3v6dpvmByewFuXjrjrJRi8H9 yCkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=q7GfTDbztJBtRyiLzAqPadkhGM0mICn7vR8np4hSo2U=; b=NHQFV5atcaGNHmMH7n4g8Rhbq0o4cT3hf6zTsCr1RttgCwjV/RKNGGl1Mz3Zzp3qan sC1gwguwDZ9BKwwno91bzO+C55btMGf1NZ54MYHp2axm6YJVlwQnEW2oXRdHD/mOeMYH mSGKDRdSdVzTomz7/LvZH/zJgy3sG+g6P9/YhUq7SLtLsMpde0By6rMtgA89ep3A78nD Ym8aURS51MZaL51Xtrm/bfA1momrRE71gHTAZ702D7ZStvIQLbo/LscB03UXOY+v4CCT ULDK29PcXFiGPvdcFewG62QvYF5zsQFSz7uXazNGESjIQMXDzKVJOPn88I0mrFrDSjhV AYhg== X-Gm-Message-State: ACgBeo1tPo6//1KdvhdwZnmDowdypyPs2rvM1PBAcvM/VHpj3x/0oM9s iRLV6upGNRWM7nJeBh6NhDSjGw== X-Received: by 2002:a05:6512:2520:b0:494:6fbe:2269 with SMTP id be32-20020a056512252000b004946fbe2269mr4951805lfb.387.1662029198290; Thu, 01 Sep 2022 03:46:38 -0700 (PDT) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h3-20020a056512220300b00492f45cbbfcsm2286586lfu.302.2022.09.01.03.46.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 03:46:37 -0700 (PDT) Message-ID: Date: Thu, 1 Sep 2022 13:46:36 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v6 4/6] clk: qcom: gpucc-sc7280: Add cx collapse reset support Content-Language: en-GB To: Philipp Zabel , Akhil P Oommen Cc: freedreno , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , Bjorn Andersson , Stephen Boyd , Douglas Anderson , krzysztof.kozlowski@linaro.org, Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org References: <1661923108-789-1-git-send-email-quic_akhilpo@quicinc.com> <20220831104741.v6.4.I5e64ff4b77bb9079eb2edeea8a02585c9e76778f@changeid> <20220901103449.GC32271@pengutronix.de> From: Dmitry Baryshkov In-Reply-To: <20220901103449.GC32271@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.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=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 01/09/2022 13:34, Philipp Zabel wrote: > On Wed, Aug 31, 2022 at 10:48:25AM +0530, Akhil P Oommen wrote: >> Allow a consumer driver to poll for cx gdsc collapse through Reset >> framework. >> >> Signed-off-by: Akhil P Oommen >> Reviewed-by: Dmitry Baryshkov >> --- >> >> (no changes since v3) >> >> Changes in v3: >> - Convert 'struct qcom_reset_ops cx_gdsc_reset' to 'static const' (Krzysztof) >> >> Changes in v2: >> - Minor update to use the updated custom reset ops implementation >> >> drivers/clk/qcom/gpucc-sc7280.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/drivers/clk/qcom/gpucc-sc7280.c b/drivers/clk/qcom/gpucc-sc7280.c >> index 9a832f2..fece3f4 100644 >> --- a/drivers/clk/qcom/gpucc-sc7280.c >> +++ b/drivers/clk/qcom/gpucc-sc7280.c >> @@ -433,12 +433,22 @@ static const struct regmap_config gpu_cc_sc7280_regmap_config = { >> .fast_io = true, >> }; >> >> +static const struct qcom_reset_ops cx_gdsc_reset = { >> + .reset = gdsc_wait_for_collapse, > > This should be accompanied by a comment explaining the not-quite-reset > nature of this workaround, i.e. what is the prerequisite for this to > actually work as expected? > >> +}; >> + >> +static const struct qcom_reset_map gpucc_sc7280_resets[] = { >> + [GPU_CX_COLLAPSE] = { .ops = &cx_gdsc_reset, .priv = &cx_gdsc }, >> +}; >> + >> static const struct qcom_cc_desc gpu_cc_sc7280_desc = { >> .config = &gpu_cc_sc7280_regmap_config, >> .clks = gpu_cc_sc7280_clocks, >> .num_clks = ARRAY_SIZE(gpu_cc_sc7280_clocks), >> .gdscs = gpu_cc_sc7180_gdscs, >> .num_gdscs = ARRAY_SIZE(gpu_cc_sc7180_gdscs), >> + .resets = gpucc_sc7280_resets, >> + .num_resets = ARRAY_SIZE(gpucc_sc7280_resets), > > See my comment on patch 2. I think instead of adding a const struct > qcom_reset_ops * to gpucc_sc7280_resets, this should just add a const > struct reset_control * to gpu_cc_sc7280_desc. While this will work for the sc7280, the platform that Akhil was developing, this will not work for other platforms (like sm8250), where the dispcc also provides traditional BCR resets. -- With best wishes Dmitry