diff options
author | Sammy He <r62914@freescale.com> | 2011-11-02 22:26:18 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-01-09 21:04:29 +0800 |
commit | 0b18f7add1ca5a4b04f9bc2b1f401f8978ed8694 (patch) | |
tree | c2e6ba8a6883109fa8504bf92139bcdeb5b614b3 /drivers/mxc | |
parent | 84836ed0e62f6ffeb9e6b1cfcf75704a5e3f64e0 (diff) |
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>
Diffstat (limited to 'drivers/mxc')
-rw-r--r-- | 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 8a11487fc0e6..c2d40bbfa1ec 100644 --- a/drivers/mxc/vpu/mxc_vpu.c +++ b/drivers/mxc/vpu/mxc_vpu.c @@ -480,6 +480,26 @@ static long vpu_ioctl(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) |