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: 13052958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F349CC433FE for ; Wed, 23 Nov 2022 03:01:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6668910E4D4; Wed, 23 Nov 2022 03:01:51 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by gabe.freedesktop.org (Postfix) with ESMTPS id C1B2210E1E4 for ; Wed, 23 Nov 2022 03:00:18 +0000 (UTC) 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 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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,