summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKen Chang <kenc@nvidia.com>2019-04-02 03:05:18 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2020-03-13 12:15:22 -0400
commite64de31e5d0be79486f3a6bbfd11965347037fe7 (patch)
tree11bca397376afb8e83a20b6e01372114800eb9be /include
parentf3c2b98214e13813e1c872359a32f64678e21834 (diff)
media: tegra: camera: vi2: locking for vi recover
Introduce rwsem for the locking between vi/csi recover call and the capture thread to avoid vi/csi register accesses during vi reset. Bug 200486098 Change-Id: I9a6b643708bec9db739ecd1e0607fe56713b00fb Signed-off-by: Ken Chang <kenc@nvidia.com> (cherry picked from commit 04765fae230bc8f7c4ae6908c7f934a4056000ae) Reviewed-on: https://git-master.nvidia.com/r/2097524 (cherry picked from commit 8e4c60d8b7ff81b817226cad1a6fd82ffaeba623) (cherry picked from commit 0313cd0998849973041daa78f57917504cf669b6) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2309291 Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/mc_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/mc_common.h b/include/media/mc_common.h
index 131087d32..c966cbd1c 100644
--- a/include/media/mc_common.h
+++ b/include/media/mc_common.h
@@ -33,6 +33,7 @@
33#include <media/csi.h> 33#include <media/csi.h>
34#include <linux/workqueue.h> 34#include <linux/workqueue.h>
35#include <linux/semaphore.h> 35#include <linux/semaphore.h>
36#include <linux/rwsem.h>
36 37
37#define MAX_FORMAT_NUM 64 38#define MAX_FORMAT_NUM 64
38#define MAX_SUBDEVICES 4 39#define MAX_SUBDEVICES 4
@@ -262,6 +263,7 @@ struct tegra_channel {
262 int interlace_bplfactor; 263 int interlace_bplfactor;
263 264
264 atomic_t syncpt_depth; 265 atomic_t syncpt_depth;
266 struct rw_semaphore reset_lock;
265}; 267};
266 268
267#define to_tegra_channel(vdev) \ 269#define to_tegra_channel(vdev) \