summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
diff options
context:
space:
mode:
authorRobert Morell <rmorell@nvidia.com>2011-03-03 15:02:53 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:12 -0800
commit384b754c2f3c70c15da177c8b11a0a51f23c76fc (patch)
tree50765782b4804e87d9bb587479aceff7965bc652 /drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
parent63a79e26218daabc625acf3a21224be2ad6624ed (diff)
video: tegra: Add control device to dc extension driver
This device exposes control over everything that's not specific to one of T20's two display controllers. It supports: - output devices - event delivery - hotplug events bug 818525 Original-Change-Id: I3a46f1dddc483b08ed3ee91a4f9c64111c1fd7eb Signed-off-by: Robert Morell <rmorell@nvidia.com> Reviewed-on: http://git-master/r/40520 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R9e49fe41f3327b797ec65c3729f4f94edbb45307
Diffstat (limited to 'drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h')
-rw-r--r--drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h b/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
index 251c072683c7..a1cd88325896 100644
--- a/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
+++ b/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
@@ -20,6 +20,7 @@
#define __TEGRA_DC_EXT_PRIV_H
#include <linux/cdev.h>
+#include <linux/list.h>
#include <linux/mutex.h>
#include <mach/dc.h>
@@ -67,6 +68,47 @@ struct tegra_dc_ext {
bool enabled;
};
+#define TEGRA_DC_EXT_EVENT_MASK_ALL \
+ TEGRA_DC_EXT_EVENT_HOTPLUG
+
+#define TEGRA_DC_EXT_EVENT_MAX_SZ 8
+
+struct tegra_dc_ext_event_list {
+ struct tegra_dc_ext_event event;
+ /* The data field _must_ follow the event field. */
+ char data[TEGRA_DC_EXT_EVENT_MAX_SZ];
+
+ struct list_head list;
+};
+
+struct tegra_dc_ext_control_user {
+ struct tegra_dc_ext_control *control;
+
+ struct list_head event_list;
+ atomic_t num_events;
+
+ u32 event_mask;
+
+ struct tegra_dc_ext_event_list event_to_copy;
+ loff_t partial_copy;
+
+ struct mutex lock;
+
+ struct list_head list;
+};
+
+struct tegra_dc_ext_control {
+ struct cdev cdev;
+ struct device *dev;
+
+ struct list_head users;
+
+ struct mutex lock;
+};
+
+extern int tegra_dc_ext_devno;
+extern struct class *tegra_dc_ext_class;
+
extern int tegra_dc_ext_pin_window(struct tegra_dc_ext_user *user, u32 id,
struct nvmap_handle_ref **handle,
dma_addr_t *phys_addr);
@@ -78,4 +120,13 @@ extern int tegra_dc_ext_set_cursor_image(struct tegra_dc_ext_user *user,
extern int tegra_dc_ext_set_cursor(struct tegra_dc_ext_user *user,
struct tegra_dc_ext_cursor *);
+extern int tegra_dc_ext_control_init(void);
+
+extern int tegra_dc_ext_queue_hotplug(struct tegra_dc_ext_control *,
+ int output);
+extern ssize_t tegra_dc_ext_event_read(struct file *filp, char __user *buf,
+ size_t size, loff_t *ppos);
+
+extern int tegra_dc_ext_get_num_outputs(void);
+
#endif /* __TEGRA_DC_EXT_PRIV_H */