summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Chen <frankc@nvidia.com>2016-09-12 21:00:56 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-19 21:24:20 -0400
commit600b388978bf1ea347b2f591ff5430f1e05da4c8 (patch)
tree4055555060dbf17ba07d952100f802f4fbfa5e92
parent62e3402b4a8df1216b3a3fb25432999591cfee43 (diff)
tegra: vi: move vi_notify_channel struct to header
Move vi_notify_channel structure from source code to header file so it can be shared with other modules that subscribe to vi_notify events. Bug 1785050 Change-Id: I5944cac4d770779853a925d85eac98b1869c4074 Signed-off-by: Frank Chen <frankc@nvidia.com> Reviewed-on: http://git-master/r/1219255 (cherry picked from commit 5d7f3b98898f691b7e7622970dcfb3c95b7059d4) Reviewed-on: http://git-master/r/1222694 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/video/tegra/host/vi/vi_notify.c18
-rw-r--r--drivers/video/tegra/host/vi/vi_notify.h19
2 files changed, 18 insertions, 19 deletions
diff --git a/drivers/video/tegra/host/vi/vi_notify.c b/drivers/video/tegra/host/vi/vi_notify.c
index c3a216757..32460ad06 100644
--- a/drivers/video/tegra/host/vi/vi_notify.c
+++ b/drivers/video/tegra/host/vi/vi_notify.c
@@ -41,24 +41,6 @@
41#define NVHOST_VI_RESET_CHANNEL \ 41#define NVHOST_VI_RESET_CHANNEL \
42 _IOW(NVHOST_VI_IOCTL_MAGIC, 15, struct tegra_vi4_syncpts_req) 42 _IOW(NVHOST_VI_IOCTL_MAGIC, 15, struct tegra_vi4_syncpts_req)
43 43
44struct vi_notify_channel {
45 struct vi_notify_dev *vnd;
46 atomic_t ign_mask;
47
48 wait_queue_head_t readq;
49 struct mutex read_lock;
50 struct rcu_head rcu;
51
52 atomic_t overruns;
53 atomic_t errors;
54 atomic_t report;
55 DECLARE_KFIFO(fifo, struct vi_notify_msg, 128);
56 struct vi_capture_status status;
57
58 vi_notify_status_callback notify_cb;
59 vi_notify_error_callback error_cb;
60};
61
62struct vi_notify_dev { 44struct vi_notify_dev {
63 struct vi_notify_driver *driver; 45 struct vi_notify_driver *driver;
64 struct device *device; 46 struct device *device;
diff --git a/drivers/video/tegra/host/vi/vi_notify.h b/drivers/video/tegra/host/vi/vi_notify.h
index e597b4b86..e572bbec1 100644
--- a/drivers/video/tegra/host/vi/vi_notify.h
+++ b/drivers/video/tegra/host/vi/vi_notify.h
@@ -70,7 +70,6 @@ void vi_notify_unregister(struct vi_notify_driver *, struct device *);
70typedef void (*vi_notify_status_callback)(const struct vi_capture_status *); 70typedef void (*vi_notify_status_callback)(const struct vi_capture_status *);
71typedef void (*vi_notify_error_callback)(void); 71typedef void (*vi_notify_error_callback)(void);
72 72
73struct vi_notify_channel;
74struct tegra_vi4_syncpts_req { 73struct tegra_vi4_syncpts_req {
75 u32 syncpt_ids[3]; 74 u32 syncpt_ids[3];
76 u8 stream; 75 u8 stream;
@@ -78,6 +77,24 @@ struct tegra_vi4_syncpts_req {
78 u16 pad; 77 u16 pad;
79}; 78};
80 79
80struct vi_notify_channel {
81 struct vi_notify_dev *vnd;
82 atomic_t ign_mask;
83
84 wait_queue_head_t readq;
85 struct mutex read_lock;
86 struct rcu_head rcu;
87
88 atomic_t overruns;
89 atomic_t errors;
90 atomic_t report;
91 DECLARE_KFIFO(fifo, struct vi_notify_msg, 128);
92 struct vi_capture_status status;
93
94 vi_notify_status_callback notify_cb;
95 vi_notify_error_callback error_cb;
96};
97
81/* internal vi_notify_channel API for kernel vi-mode driver */ 98/* internal vi_notify_channel API for kernel vi-mode driver */
82int vi_notify_channel_set_ign_mask(struct vi_notify_channel *, u32); 99int vi_notify_channel_set_ign_mask(struct vi_notify_channel *, u32);
83int vi_notify_channel_set_syncpts(unsigned, 100int vi_notify_channel_set_syncpts(unsigned,