summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/ext
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/dc/ext')
-rw-r--r--drivers/video/tegra/dc/ext/control.c18
-rw-r--r--drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/ext/control.c b/drivers/video/tegra/dc/ext/control.c
index f6fb3c0d9006..9caf3e11c16c 100644
--- a/drivers/video/tegra/dc/ext/control.c
+++ b/drivers/video/tegra/dc/ext/control.c
@@ -128,6 +128,12 @@ static int set_event_mask(struct tegra_dc_ext_control_user *user, u32 mask)
return 0;
}
+static int get_capabilities(struct tegra_dc_ext_control_capabilities *caps)
+{
+ caps->caps = TEGRA_DC_EXT_CAPABILITIES;
+ return 0;
+}
+
static long tegra_dc_ext_control_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
@@ -176,6 +182,18 @@ static long tegra_dc_ext_control_ioctl(struct file *filp, unsigned int cmd,
}
case TEGRA_DC_EXT_CONTROL_SET_EVENT_MASK:
return set_event_mask(user, (u32) arg);
+ case TEGRA_DC_EXT_CONTROL_GET_CAPABILITIES:
+ {
+ struct tegra_dc_ext_control_capabilities args;
+ int ret;
+
+ ret = get_capabilities(&args);
+
+ if (copy_to_user(user_arg, &args, sizeof(args)))
+ return -EFAULT;
+
+ return ret;
+ }
default:
return -EINVAL;
}
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 54a10b2c8682..abebd5970ecb 100644
--- a/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
+++ b/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
@@ -90,6 +90,8 @@ struct tegra_dc_ext_event_list {
struct list_head list;
};
+#define TEGRA_DC_EXT_CAPABILITIES 0
+
struct tegra_dc_ext_control_user {
struct tegra_dc_ext_control *control;