Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7609798rwb; Wed, 23 Nov 2022 08:31:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf7FUEuf/7eY+A1Mbp1N9vt+y4O7bPepb1KNZZymQeT7jCzO/8RevvQ6xNMx8Eb3XIj5la/m X-Received: by 2002:a05:6402:4028:b0:467:c33e:edd6 with SMTP id d40-20020a056402402800b00467c33eedd6mr1551779eda.146.1669221109863; Wed, 23 Nov 2022 08:31:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669221109; cv=none; d=google.com; s=arc-20160816; b=weJLZ7zSOD3+Pzp+b7HqZH3jXouIySE1TRENyU2G7mpGP3KzBidWUjKyPbSVRrRWZT 2q69odFB3DOlN/3Y8Flqz7cdvchgORQ4DPrFYMbbeGD6yh+MZrmANVRfx/H4Gat3pPt6 GxoYJP88WWoBhVptIYp6b5f7USLRJYZW8h3nJ5t6mxqMevmwBn1YUfUE/m+uJlbgC7yD NXeM7jYc7kcruE9aMLa8ugVJMFXNwDjrvoVW11sN2ozc2oaHbbYApOfkD4je1F5Nthq/ 1jDG8zPJBduoKnrx9PxH1v3PtjBLRoTNqNFhY4eJHVxUG4g3ZvZxSZtkuQO2RI+CEliD oA/A== 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; bh=hfKOstQ259HeM2RxL9sO3zgDCQjUbjCMUob5giTqhNo=; b=HGNCr1eYldhExBvv57p251UpF8VAfuFJ3wBq/pTfG16rQ1Ur68ujCMcuZW0U9enpWS 6JAtdMS+5bxieWohz8wS8CpGlzPYyTCikRqsGsIfGivABhzU+bYT/yFZBYKDbdOLE6xr RDS+qG/eHS54jqEnXhHUOyWSj+GquMRI78tKOWj+7hi5UKKqU6dO7Xvu06R6X8WkySRa wnjq10Gu4wTJIpQRnjIBFiErDqgJmLqu2nXSWzRxnFwsewHdZ3fN2v3Ktwi3rurADBLW ZeBiv7sHF7GFPe4FodsIaWgdtdEsHyBGnX7GNag0RtVLMlpoz17bjiOOmzCXPIj2hfD1 htag== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a056402271000b00467570d605dsi16581738edd.614.2022.11.23.08.31.25; Wed, 23 Nov 2022 08:31:49 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236642AbiKWP7z (ORCPT + 88 others); Wed, 23 Nov 2022 10:59:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237787AbiKWP7g (ORCPT ); Wed, 23 Nov 2022 10:59:36 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B8B1A19E for ; Wed, 23 Nov 2022 07:59:35 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D72831FB; Wed, 23 Nov 2022 07:59:41 -0800 (PST) Received: from [10.57.87.10] (unknown [10.57.87.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BC2823F73B; Wed, 23 Nov 2022 07:59:30 -0800 (PST) Message-ID: <2ddef062-2db4-974b-e856-58878b70856e@arm.com> Date: Wed, 23 Nov 2022 15:59:28 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v9 02/11] drm/panfrost: Don't sync rpm suspension after mmu flushing Content-Language: en-GB To: Dmitry Osipenko , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Clark , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= , Qiang Yu , Alyssa Rosenzweig , Rob Herring , Sean Paul , Dmitry Baryshkov , Abhinav Kumar Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org References: <20221123025723.695075-1-dmitry.osipenko@collabora.com> <20221123025723.695075-3-dmitry.osipenko@collabora.com> From: Steven Price In-Reply-To: <20221123025723.695075-3-dmitry.osipenko@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 23/11/2022 02:57, Dmitry Osipenko wrote: > Lockdep warns about potential circular locking dependency of devfreq > with the fs_reclaim caused by immediate device suspension when mapping is > released by shrinker. Fix it by doing the suspension asynchronously. > > Signed-off-by: Dmitry Osipenko Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c > index e246d914e7f6..99a0975f6f03 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c > +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c > @@ -273,7 +273,7 @@ static void panfrost_mmu_flush_range(struct panfrost_device *pfdev, > if (pm_runtime_active(pfdev->dev)) > mmu_hw_do_operation(pfdev, mmu, iova, size, AS_COMMAND_FLUSH_PT); > > - pm_runtime_put_sync_autosuspend(pfdev->dev); > + pm_runtime_put_autosuspend(pfdev->dev); > } > > static int mmu_map_sg(struct panfrost_device *pfdev, struct panfrost_mmu *mmu,