Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp275981imn; Wed, 3 Aug 2022 03:27:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ssj/7TSgXYL1xuCV/XIueSFN7khINXSr+ykUpSOQmHZo2+xzZKfw5sXHJ3+xo1H1PBG8Ws X-Received: by 2002:a05:6402:51ca:b0:43a:df65:d180 with SMTP id r10-20020a05640251ca00b0043adf65d180mr25449633edd.255.1659522476667; Wed, 03 Aug 2022 03:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659522476; cv=none; d=google.com; s=arc-20160816; b=YtWcQMbCtJU3b0y8QHOGuLSyxjQSh8Vsa/ROXULVR7hCYmsaVM7VbPsDK7lwJLpno4 vXjIIBqyJmNb0s5YamjePXaBcQjp04QGgm5al4cb744yPj9BWfZN3fqY8e2c16ERRbW0 HUObldBUzLmP0u4zab34EA26xOkddR9N+PpEExp2EAxP4S01CwlJKmZlaMNvuZ2TcT5d nhDTer4oRr5I1NeoeQgci2w8Yt4v441Iw31Bs5vJK4B8rMLKlDTH8TexQO70GjiuBDno g/uiiq5OsbEV2wTuhZKoqQAs9a8mJrbQDhF3zSSVfc2MCTnc/ohpuox4RMmEgU/fn2Bj mGIA== 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=1rVxQ4eqI3N9wCVO+tgYoYxdpipoicSFsvvHXjVF02g=; b=tzOqkmsWYSLdkyzmkwnFlylVuwfGJRP7jfOC0a8mTkoH6PkV4gxEZQlrQOAJnUGUWc IKUeIITKxbsFvl/K5LrVti1hFpuuePiQRMLBdAhWSHMog+tyvkKEHSQNCzyp7jLFe+Z2 qiU6d2B+WB+2MugnfB/G4u47dEalsjS5GJzRtwWNKwGZ19dlsZD7GkODrMW2sXWUfWyP JUJPsusoU9Zs1hBDc6dx0wvwIvLxRFwxBD+t8h2VO6hGnX1qfP/Uw0Ib64C1O8N/UfWx LE/1gv5XV0vm5cVSW2V44+4t1abCDHkrokonz6RYMJjxgNhq2KnhwavZ3k0ekTyWSGhC LmCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=C3Cu6vOs; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a1709065d0300b0070397358bcbsi17175961ejt.33.2022.08.03.03.27.31; Wed, 03 Aug 2022 03:27:56 -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=@quicinc.com header.s=qcdkim header.b=C3Cu6vOs; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235850AbiHCKCB (ORCPT + 99 others); Wed, 3 Aug 2022 06:02:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231533AbiHCKB7 (ORCPT ); Wed, 3 Aug 2022 06:01:59 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D78F91836B; Wed, 3 Aug 2022 03:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1659520919; x=1691056919; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=1rVxQ4eqI3N9wCVO+tgYoYxdpipoicSFsvvHXjVF02g=; b=C3Cu6vOsuzPJuzImBkgFrMpA39OFtZBJnzHRhL1gPpYkCXFfM9ufo5Cm f7HrPkGh/Jr7QW1INMGoqqL18jJuppc/P1JvnOESosfsiwojecjjsT1f6 iylDLVO+2Ny4jaDZ59bd4338xhctqw/rvWAMKsU2WR9bBE6LgbVmx+Eeu E=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 03 Aug 2022 03:01:59 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2022 03:01:58 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 3 Aug 2022 03:01:57 -0700 Received: from [10.216.24.92] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 3 Aug 2022 03:01:51 -0700 Message-ID: <0f90ef4d-4b74-2746-a37c-4a661cc0d5ea@quicinc.com> Date: Wed, 3 Aug 2022 15:31:48 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH 0/5] clk/qcom: Support gdsc collapse polling using 'reset' inteface Content-Language: en-US To: Rob Clark , Dmitry Baryshkov CC: freedreno , , , "Bjorn Andersson" , Stephen Boyd , Douglas Anderson , Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Michael Turquette , Philipp Zabel , "Rob Herring" , Stephen Boyd , , , References: <1659172664-10345-1-git-send-email-quic_akhilpo@quicinc.com> <34ae275e-8d4c-3735-c08c-4769caf2909c@linaro.org> From: Akhil P Oommen In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 8/3/2022 12:02 AM, Rob Clark wrote: > On Tue, Aug 2, 2022 at 12:02 AM Dmitry Baryshkov > wrote: >> On 30/07/2022 12:17, Akhil P Oommen wrote: >>> Some clients like adreno gpu driver would like to ensure that its gdsc >>> is collapsed at hardware during a gpu reset sequence. This is because it >>> has a votable gdsc which could be ON due to a vote from another subsystem >>> like tz, hyp etc or due to an internal hardware signal. >> If this is votable, do we have any guarantee that the gdsc will collapse >> at all? How can we proceed if it did not collapse? > Other potential votes should be transient. But I guess we eventually > need to timeout and give up. At which point we are no worse off than > before. > > But hmm, we aren't using RBBM_SW_RESET_CMD for sw reset like we have > on previous generations? That does seem a bit odd. Looks like kgsl > does use it. > > BR, > -R Like Rob mentioned there could be transient votes from other clients/subsystem. It could be even stuck ON when hardware is in bad shape in some very rare cases. For the worst case scenario, I have added a timeout (500msec) in the gdsc reset op. I have added the Soft reset in [1]. But this resets only the core gpu blocks, not everything. For eg. GMU. [1] [PATCH v3 7/8] drm/msm/a6xx: Improve gpu recovery sequence > >>> To allow >>> this, gpucc driver can expose an interface to the client driver using >>> reset framework. Using this the client driver can trigger a polling within >>> the gdsc driver. >> Trigger the polling made me think initially that we will actually >> trigger something in the HW. Instead the client uses reset framework to >> poll for the gdsc to be reset. Yes. I should replace 'trigger' with 'start' here. -Akhil. >> >>> This series is rebased on top of linus's master branch. >>> >>> Related discussion: https://patchwork.freedesktop.org/patch/493144/ >>> >>> >>> Akhil P Oommen (5): >>> dt-bindings: clk: qcom: Support gpu cx gdsc reset >>> clk: qcom: Allow custom reset ops >>> clk: qcom: gpucc-sc7280: Add cx collapse reset support >>> clk: qcom: gdsc: Add a reset op to poll gdsc collapse >>> arm64: dts: qcom: sc7280: Add Reset support for gpu >>> >>> arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 +++ >>> drivers/clk/qcom/gdsc.c | 23 +++++++++++++++++++---- >>> drivers/clk/qcom/gdsc.h | 7 +++++++ >>> drivers/clk/qcom/gpucc-sc7280.c | 6 ++++++ >>> drivers/clk/qcom/reset.c | 6 ++++++ >>> drivers/clk/qcom/reset.h | 2 ++ >>> include/dt-bindings/clock/qcom,gpucc-sc7280.h | 3 +++ >>> 7 files changed, 46 insertions(+), 4 deletions(-) >>> >> >> -- >> With best wishes >> Dmitry