summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x/dev.h
diff options
context:
space:
mode:
authorArto Merilainen <amerilainen@nvidia.com>2016-11-08 19:51:33 +0200
committerThierry Reding <treding@nvidia.com>2016-11-11 15:33:13 +0100
commitd4b5781890b9329b9e7720f14d3eeb5661348535 (patch)
treea1ce286f7e473f0bd9103f0d59321d1af6d46faf /drivers/gpu/host1x/dev.h
parentf08ef2d1a1a9aaa756823e847f9eb74f3658393a (diff)
downloadlinux-next-d4b5781890b9329b9e7720f14d3eeb5661348535.tar.gz
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;