From patchwork Wed Nov 23 02:57:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 24671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2561767wrr; Tue, 22 Nov 2022 19:03:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf7CbkaM1NwfdpzhCEeuTjHdmJTkbZ8ongdXu1j2XLgmdQ3LZla/Gi6Gufu+D+5l8HYo+duD X-Received: by 2002:a17:906:cc9b:b0:799:9ace:e868 with SMTP id oq27-20020a170906cc9b00b007999acee868mr21481848ejb.451.1669172605076; Tue, 22 Nov 2022 19:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669172605; cv=none; d=google.com; s=arc-20160816; b=uM00do+0Bj3ceFaJk8KYfwgIErTKJh0hnKoyTNd+RMeEqIszsBYBoHWJc4KUVvpUCA qSVZC0GmUiZD/QFLST2V70+so/D2rf4Jvdj3EimsKxZdrO0TeRoJdEVjfaVGMFgJ/g19 255o5p7ssQnwprWYEn1DqZTuoWLFfwa7rUF1ELusfa6ZUiK9Dg5coqw4VK/yI5ofi0eC p6cqVhsmHyZeyutYjc7pJNnkgnwyO7POpQZdt7/bLkDLXQeUqKmCIEG8pSBcHkfom0NQ CPjy3tV7wf3idplUoTMA1q+W4cmv00jTISB8P/2NVfTIvZtdqEOL+/wWoZ7GJSxtjvFO cs/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jRu0ihgGBjKemeWmCNHntd+Bg14e8zAfhszTe0TPn2g=; b=TWQ4P3TC6sRSobEcbIK0S24IBrrSRvuzW17v9R71oueUHFrsCQqrYIlCkIIDlflbI8 Vx5YW/AiwkWjvuijbnJLcnKefVbG/6bppaaAoKkCPAlm5sd6uAq4V7AtYhKtsrLTfDWd 59apyRdVe/SOxkJZEOqhoPxaiBvFioV7Fiavkjw17lxhWkdxSrNhECHmtOYUjtOqOmkd 66IDi92YypT3QagiD6JjQC2QvjI3LjsNoH+CYkJc3GTvzlU416pbSCqcZLQk26A/mGmd QkFZ5py2bUKRacwu7Fn5lMZJUun1Ud9Z7b/E60VirBZeLKJVJjEqqyDloa5+7wqhhigm IVug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BpWBrZxM; 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=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm15-20020a170907948f00b0077441079bfbsi14472280ejc.434.2022.11.22.19.02.59; Tue, 22 Nov 2022 19:03:25 -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; dkim=pass header.i=@collabora.com header.s=mail header.b=BpWBrZxM; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235320AbiKWDAc (ORCPT + 99 others); Tue, 22 Nov 2022 22:00:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235178AbiKWDAS (ORCPT ); Tue, 22 Nov 2022 22:00:18 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D20528517C for ; Tue, 22 Nov 2022 19:00:17 -0800 (PST) Received: from dimapc.. (109-252-117-140.nat.spd-mgts.ru [109.252.117.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id C3EB76602AEA; Wed, 23 Nov 2022 03:00:14 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1669172416; bh=bCtRcV3G+l88aFGcEVKaXpZkB9zlpbX6mrvZZ+14XRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BpWBrZxMk3rCf9xcNlytosyR9+eq8jl8eoIM9x1Mg9XXZmfoxeMbFjaEMVSDo46ZU dvMiqqfVtPzC7zvk1nrpssSoTSbtZzZd6v7c0tg9g7Z445qc8pHbBK93joxTH06yhn qpRaDIkyB1wK6fQ8LjeP6q20Cg67gHNGnPeuARz4jyOBVuEVMpLz2jB831j6r9Y679 haqxoOrwbC+erNvho+ywQ+CAJwKAVKS1ttOTzP8GHU7oQB1zW07JlfKRDIBXlkArbx ZdWnTlsi/WPZoIvocMP9M5Cs3D4ZkrB7VITM23f1t00e8SOXocSwY25e7T8fDuH0Uk wDjUUOwmckGIQ== From: Dmitry Osipenko To: 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 , Steven Price , Alyssa Rosenzweig , Rob Herring , Sean Paul , Dmitry Baryshkov , Abhinav Kumar Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org Subject: [PATCH v9 02/11] drm/panfrost: Don't sync rpm suspension after mmu flushing Date: Wed, 23 Nov 2022 05:57:14 +0300 Message-Id: <20221123025723.695075-3-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221123025723.695075-1-dmitry.osipenko@collabora.com> References: <20221123025723.695075-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750254333661112707?= X-GMAIL-MSGID: =?utf-8?q?1750254333661112707?= 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,