]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/panfrost: Don't sync rpm suspension after mmu flushing
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Thu, 17 Nov 2022 01:40:38 +0000 (04:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:39 +0000 (13:33 +0100)
[ Upstream commit 77afffe67dbcd31b0ca420d666babefb4c887fde ]

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.

Reviewed-by: Steven Price <steven.price@arm.com>
Fixes: 22458244e31c ("drm/panfrost: Rework page table flushing and runtime PM interaction")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/all/20230108210445.3948344-3-dmitry.osipenko@collabora.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panfrost/panfrost_mmu.c

index 4e83a1891f3edc493ac3c5b9bbe1b7eab8b5b52b..666a5e53fe1938dabd3dbc244b2601758205f2c4 100644 (file)
@@ -282,7 +282,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,