To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.
remove some unused ioctl cmd.
clear some building warning.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
the semaphore is unlocked in isr in normal case,
if the interrupt is missed, and timeout is triggered,
there will be no change to unlock it
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Since kernel verision 5.16, there has a blk-ctrl driver uniformly handle blk-ctrls,
so, don't need vpu driver handle it separately
keep original function to be compatiable with previous device tree.
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
File handle is unique for each instance, it is more reasonable and safe
to use file handle to indicate which instance is occuping encoder core.
Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Directly check 'regs.offset + regs.size', instead of
'(regs.offset + regs.size) / 4', that has a risk if it isn't
multiple of 4.
(coverity ID 17802820)
Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
Userspace could select through the new ioctl to read/write VPU HW
registers, instead of through mmap HW registers.
This method generally used for secure mode that avoid userspace directly
access HW registers.
Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
change module device table name to fix build error as module
rename the c source name to avoid conflict with h1
release clk avoid memory leak
fix typo error in core index
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 099a3ae272)
ioremap has provided non-cached semantics by default since the Linux 2.6
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>