mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
50 lines
1.4 KiB
Diff
50 lines
1.4 KiB
Diff
|
From 9ca7a0b9b98e41c543bd328469e213b89251d470 Mon Sep 17 00:00:00 2001
|
||
|
From: Sammy He <r62914@freescale.com>
|
||
|
Date: Wed, 2 Nov 2011 20:08:42 +0800
|
||
|
Subject: [PATCH] ENGR00161215-2 vpu: Add ioctls for querying and setting bitwork memory
|
||
|
|
||
|
Add VPU_IOC_QUERY_BITWORK_MEM and VPU_IOC_SET_BITWORK_MEM ioctls
|
||
|
implementation for registerring bitwork memory allocated from user
|
||
|
space to vpu driver.
|
||
|
|
||
|
Signed-off-by: Sammy He <r62914@freescale.com>
|
||
|
(cherry picked from commit 98d71e85dbd05df9c866d153a4ead9526a26422e)
|
||
|
---
|
||
|
drivers/mxc/vpu/mxc_vpu.c | 20 ++++++++++++++++++++
|
||
|
1 files changed, 20 insertions(+), 0 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c
|
||
|
index 41bd188..00f164a 100644
|
||
|
--- a/drivers/mxc/vpu/mxc_vpu.c
|
||
|
+++ b/drivers/mxc/vpu/mxc_vpu.c
|
||
|
@@ -446,6 +446,26 @@ static int vpu_ioctl(struct inode *inode, struct file *filp, u_int cmd,
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
+ /*
|
||
|
+ * The following two ioctl is used when user allocates working buffer
|
||
|
+ * and register it to vpu driver.
|
||
|
+ */
|
||
|
+ case VPU_IOC_QUERY_BITWORK_MEM:
|
||
|
+ {
|
||
|
+ if (copy_to_user((void __user *)arg,
|
||
|
+ &bitwork_mem,
|
||
|
+ sizeof(struct vpu_mem_desc)))
|
||
|
+ ret = -EFAULT;
|
||
|
+ break;
|
||
|
+ }
|
||
|
+ case VPU_IOC_SET_BITWORK_MEM:
|
||
|
+ {
|
||
|
+ if (copy_from_user(&bitwork_mem,
|
||
|
+ (struct vpu_mem_desc *)arg,
|
||
|
+ sizeof(struct vpu_mem_desc)))
|
||
|
+ ret = -EFAULT;
|
||
|
+ break;
|
||
|
+ }
|
||
|
case VPU_IOC_SYS_SW_RESET:
|
||
|
{
|
||
|
if (vpu_plat->reset)
|
||
|
--
|
||
|
1.5.4.4
|
||
|
|