summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/tegra/nvavp/nvavp_dev.c13
-rw-r--r--include/linux/tegra_nvavp.h5
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/media/video/tegra/nvavp/nvavp_dev.c b/drivers/media/video/tegra/nvavp/nvavp_dev.c
index 407e35b40c4e..c842fc0124ce 100644
--- a/drivers/media/video/tegra/nvavp/nvavp_dev.c
+++ b/drivers/media/video/tegra/nvavp/nvavp_dev.c
@@ -1013,6 +1013,16 @@ err_cmdbuf_mmap:
return ret;
}
+static int nvavp_wake_avp_ioctl(struct file *filp, unsigned int cmd,
+ unsigned long arg)
+{
+ wmb();
+ /* wake up avp */
+ writel(0xA0000001, NVAVP_OS_OUTBOX);
+ return 0;
+}
+
+
static int tegra_nvavp_open(struct inode *inode, struct file *filp)
{
struct miscdevice *miscdev = filp->private_data;
@@ -1103,6 +1113,9 @@ static long tegra_nvavp_ioctl(struct file *filp, unsigned int cmd,
case NVAVP_IOCTL_GET_CLOCK:
ret = nvavp_get_clock_ioctl(filp, cmd, arg);
break;
+ case NVAVP_IOCTL_WAKE_AVP:
+ ret = nvavp_wake_avp_ioctl(filp, cmd, arg);
+ break;
default:
ret = -EINVAL;
break;
diff --git a/include/linux/tegra_nvavp.h b/include/linux/tegra_nvavp.h
index 32dc4c62b4bd..971054440866 100644
--- a/include/linux/tegra_nvavp.h
+++ b/include/linux/tegra_nvavp.h
@@ -76,9 +76,10 @@ struct nvavp_clock_args {
struct nvavp_clock_args)
#define NVAVP_IOCTL_GET_CLOCK _IOR(NVAVP_IOCTL_MAGIC, 0x65, \
struct nvavp_clock_args)
-
+#define NVAVP_IOCTL_WAKE_AVP _IOR(NVAVP_IOCTL_MAGIC, 0x66, \
+ __u32)
#define NVAVP_IOCTL_MIN_NR _IOC_NR(NVAVP_IOCTL_SET_NVMAP_FD)
-#define NVAVP_IOCTL_MAX_NR _IOC_NR(NVAVP_IOCTL_GET_CLOCK)
+#define NVAVP_IOCTL_MAX_NR _IOC_NR(NVAVP_IOCTL_WAKE_AVP)
#endif /* __LINUX_TEGRA_NVAVP_H */