summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/dev.h
diff options
context:
space:
mode:
authorArto Merilainen2016-11-08 18:51:33 +0100
committerThierry Reding2016-11-11 15:33:13 +0100
commitd4b5781890b9329b9e7720f14d3eeb5661348535 (patch)
treea1ce286f7e473f0bd9103f0d59321d1af6d46faf /drivers/gpu/host1x/dev.h
parentgpu: host1x: Store device address to all bufs (diff)
downloadkernel-qcow2-linux-d4b5781890b9329b9e7720f14d3eeb5661348535.tar.gz
kernel-qcow2-linux-d4b5781890b9329b9e7720f14d3eeb5661348535.tar.xz
kernel-qcow2-linux-d4b5781890b9329b9e7720f14d3eeb5661348535.zip
gpu: host1x: Add locking to syncpt
Currently syncpoints are not locked by mutex and this causes races if we are aggressively freeing and allocating syncpoints. This patch adds missing mutex protection to syncpoint structures. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-by: Shridhar Rasal <srasal@nvidia.com> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> [treding@nvidia.com: use better label names, don't reset local variable] Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/dev.h')
-rw-r--r--drivers/gpu/host1x/dev.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/host1x/dev.h b/drivers/gpu/host1x/dev.h
index 5220510f39da..06dd4f85125f 100644
--- a/drivers/gpu/host1x/dev.h
+++ b/drivers/gpu/host1x/dev.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013, NVIDIA Corporation.
+ * Copyright (c) 2012-2015, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -120,6 +120,7 @@ struct host1x {
struct host1x_syncpt *nop_sp;
+ struct mutex syncpt_mutex;
struct mutex chlist_mutex;
struct host1x_channel chlist;
unsigned long allocated_channels;