From d4b5781890b9329b9e7720f14d3eeb5661348535 Mon Sep 17 00:00:00 2001 From: Arto Merilainen Date: Tue, 8 Nov 2016 19:51:33 +0200 Subject: 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 Reviewed-by: Shridhar Rasal Signed-off-by: Mikko Perttunen [treding@nvidia.com: use better label names, don't reset local variable] Signed-off-by: Thierry Reding --- drivers/gpu/host1x/dev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/host1x/dev.h') 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; -- cgit v1.2.3