]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/panfrost: Fix module unload
authorSteven Price <steven.price@arm.com>
Fri, 30 Oct 2020 14:58:33 +0000 (14:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:03 +0000 (19:22 +0100)
commita79cf8d05051c478a670e5a2f29c3d5e71a394c1
tree01b34c3c3c988835a26ae8bf384f5a955630276f
parentc983371712681f8228d07c10d4c2b30165d03549
drm/panfrost: Fix module unload

[ Upstream commit 876b15d2c88d8c005f1aebeaa23f1e448d834757 ]

When unloading the call to pm_runtime_put_sync_suspend() will attempt to
turn the GPU cores off, however panfrost_device_fini() will have turned
the clocks off. This leads to the hardware locking up.

Instead don't call pm_runtime_put_sync_suspend() and instead simply mark
the device as suspended using pm_runtime_set_suspended(). And also
include this on the error path in panfrost_probe().

Fixes: aebe8c22a912 ("drm/panfrost: Fix possible suspend in panfrost_remove")
Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201030145833.29006-1-steven.price@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panfrost/panfrost_drv.c