drm/panfrost: Don't corrupt the queue mutex on open/close
authorSteven Price <steven.price@arm.com>
Thu, 29 Oct 2020 17:00:47 +0000 (17:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:16:53 +0000 (14:16 +0100)
commit51495b719515ddae417e4bafc7e100c34833af4b
tree6830dda5c0a2d45ed696ff2fc2c19e09800e723c
parent9d7751a39a19b0090300b2b0498e397f9047e125
drm/panfrost: Don't corrupt the queue mutex on open/close

[ Upstream commit a17d609e3e216c406f7c0cec2a94086a4401ac06 ]

The mutex within the panfrost_queue_state should have the lifetime of
the queue, however it was erroneously initialised/destroyed during
panfrost_job_{open,close} which is called every time a client
opens/closes the drm node.

Move the initialisation/destruction to panfrost_job_{init,fini} where it
belongs.

Fixes: 1a11a88cfd9a ("drm/panfrost: Fix job timeout handling")
Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201029170047.30564-1-steven.price@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panfrost/panfrost_job.c