Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp198661rwb; Thu, 18 Aug 2022 02:06:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR4wg8vJ4dRLO7NB1Ktd04FYVLZPK+cDliurFYQlT7sUyPmHFkNkEughYYOrwDnuBhHdnOK2 X-Received: by 2002:a63:2d46:0:b0:41d:858b:52ff with SMTP id t67-20020a632d46000000b0041d858b52ffmr1750343pgt.516.1660813572279; Thu, 18 Aug 2022 02:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660813572; cv=none; d=google.com; s=arc-20160816; b=e48FVVx8zMklL4/BRfUdAsLlaSUHkSbWyxkSkzj2YPdu6FLhv7wybdCkSjp0QzoTwd /ZVAPvUYRXZlU0hwkrRjdQ4A+HYiL8jKLVWm5F3kQbgs2LX+nmNnkJR6UC2KjaxbhAlg dUvJrhVNdPo2INK4OqUnXIGgXygQqbB/bErntiXw4EauHdbHBuZKnrN9A+GwC53Y5max HWIFQqpm6+3S3+h4PsjmmgE4d4XNM+CynH9cBSRm7F700uReAqaZG1sKG4CZlULN7ugU Nofj/2ku5eF4BMCxm2lbdAMTT4E/pseCz2kpVWMxqNAoRNlh4wJmiwPiuNzyTLAVkIFk Isow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=13Ps/Kqt5pfkUY6Ln1oYdK2cwyby8NhKFQbvE+AVpc0=; b=sJK4oDiQ0dHnxjJTMxG/GHauv/usn8iuguriPwKxgHhx5K0EboKnZt7qLVpk5rzHFw IhgKuKTSHAhIyHfd+Xro43f44/hiEzn3GTZ1fY3/fEzxoIkZ8rjCa1XfclH3wgb98lF8 tJ7q1DthRgk1SR5OyOZkSUPnyoJ42UM6odN+w7vr9njHl1iVycBKt5e4Isx6xn+AcfPH TYC9JyZEUqHwNubUPM+mOxCrn3CYYRR8cpMBBHj7+Cza3K04xd0FAc8bSKVr6TbYdiZV 4IC9Nbtfx2ONltLM2nPZqkVqTaTITCn5uiZSEBlkHRfLW4XzKu+OidH+Ag/7H7CLauZr efow== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p12-20020a63e64c000000b0041cfccdf0b6si931335pgj.437.2022.08.18.02.06.00; Thu, 18 Aug 2022 02:06:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243115AbiHRIy6 (ORCPT + 99 others); Thu, 18 Aug 2022 04:54:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236969AbiHRIyx (ORCPT ); Thu, 18 Aug 2022 04:54:53 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9D7648CA6 for ; Thu, 18 Aug 2022 01:54:51 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oObIZ-0001Iu-3G; Thu, 18 Aug 2022 10:54:43 +0200 Received: from pza by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1oObIU-0008RM-BW; Thu, 18 Aug 2022 10:54:38 +0200 Date: Thu, 18 Aug 2022 10:54:38 +0200 From: Philipp Zabel To: Akhil P Oommen Cc: freedreno , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , Bjorn Andersson , Dmitry Baryshkov , Matthias Kaehlcke , Jonathan Marek , Jordan Crouse , Douglas Anderson , Abhinav Kumar , Chia-I Wu , Daniel Vetter , David Airlie , Sean Paul , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 5/7] drm/msm/a6xx: Ensure CX collapse during gpu recovery Message-ID: <20220818085438.GA29793@pengutronix.de> References: <1660749261-7602-1-git-send-email-quic_akhilpo@quicinc.com> <20220817204224.v4.5.I176567525af2b9439a7e485d0ca130528666a55c@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220817204224.v4.5.I176567525af2b9439a7e485d0ca130528666a55c@changeid> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: pza@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hi Akhil, On Wed, Aug 17, 2022 at 08:44:18PM +0530, Akhil P Oommen wrote: > Because there could be transient votes from other drivers/tz/hyp which > may keep the cx gdsc enabled, we should poll until cx gdsc collapses. > We can use the reset framework to poll for cx gdsc collapse from gpucc > clk driver. > > This feature requires support from the platform's gpucc driver. > > Signed-off-by: Akhil P Oommen > Reviewed-by: Dmitry Baryshkov > --- > > (no changes since v3) > > Changes in v3: > - Use reset interface from gpucc driver to poll for cx gdsc collapse > https://patchwork.freedesktop.org/series/106860/ > > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 ++++ > drivers/gpu/drm/msm/msm_gpu.c | 4 ++++ > drivers/gpu/drm/msm/msm_gpu.h | 4 ++++ > 3 files changed, 12 insertions(+) > [...] > diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c > index 07e55a6..4a57627 100644 > --- a/drivers/gpu/drm/msm/msm_gpu.c > +++ b/drivers/gpu/drm/msm/msm_gpu.c [...] > @@ -903,6 +904,9 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev, > if (IS_ERR(gpu->gpu_cx)) > gpu->gpu_cx = NULL; > > + gpu->cx_collapse = devm_reset_control_get_optional(&pdev->dev, > + "cx_collapse"); Please use devm_reset_control_get_optional_exclusive() instead. With that, Reviewed-by: Philipp Zabel regards Philipp