diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2019-04-18 10:41:48 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-04-18 09:27:34 -0500 |
commit | aa20236784ab3d0372591d6eca692956bca4ebfb (patch) | |
tree | 3eaa8e5e2bf8334b648387a023a6060d2304d017 /drivers/gpu/drm/panfrost/panfrost_device.c | |
parent | db594ba3fcf9b2b84d71ffcc62a54b49c21427da (diff) | |
download | lwn-aa20236784ab3d0372591d6eca692956bca4ebfb.tar.gz lwn-aa20236784ab3d0372591d6eca692956bca4ebfb.zip |
drm/panfrost: Prevent concurrent resets
If a job times out in slot 0 while a reset is performed because a job
timed out in slot 1, the drm-sched core can get into a deadlock.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190418084305.45021-1-tomeu.vizoso@collabora.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_device.c')
-rw-r--r-- | drivers/gpu/drm/panfrost/panfrost_device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index 91e8fb0f2b25..970f669c6d29 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -98,6 +98,7 @@ int panfrost_device_init(struct panfrost_device *pfdev) struct resource *res; mutex_init(&pfdev->sched_lock); + mutex_init(&pfdev->reset_lock); INIT_LIST_HEAD(&pfdev->scheduled_jobs); spin_lock_init(&pfdev->hwaccess_lock); |