Commit Graph

21 Commits

Author SHA1 Message Date
Ming Qian
f59f640060 MA-22424-4: mxc: vpu: Use fixed-length types in ioctl parameters
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>
2024-07-02 10:07:53 +09:00
Dandan Sun
6c14c05622 LF-10537 remove CONFIG_DEVICE_THERMAL in hantrodec.c
imx device cooling driver device_cooling.c is removed, so replace the
expired config CONFIG_DEVICE_THERMAL(device_cooling.c) with the
current used one CONFIG_DEVFREQ_THERMAL(devfreq_cooling.c).

Signed-off-by: Dandan Sun <dandan.sun@nxp.com>
Reviewed by: Guangliu Ding <guangliu.ding@nxp.com>
2023-11-29 17:04:00 +08:00
TaoJiang
59c0a8dff8 LF-9607: vpu: hantro: solve local variable underrun issue
1.Coverity report this issue
2.add local variable range check

Reviewed-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: TaoJiang <tao.jiang_2@nxp.com>
2023-10-30 15:58:10 +08:00
Ming Qian
f5bc80aed6 LF-8969-1: mxc: hantro: correct compat_ioctl to support 32bit
call compat_ptr_ioctl directly for the ioctl
that either ignore the argument or
pass a pointer to a compatible data type

refine hantrodec_ioctl32 to handle other ioctl correctly.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2023-10-30 15:58:09 +08:00
Zhou Peng
64c93a4203 arm64: imx8m: vpu: update class_create() usage
Cope with API change:
1aaba11da9 ("driver core: class: remove module * from class_create()")

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:08 +08:00
Li Yang
e17a1890a6 arm64: imx8m: vpu: update vm_flags with modifier calls
Deal with 1c71222e5f ("mm: replace vma->vm_flags direct modifications
with modifier calls")

Signed-off-by: Li Yang <leoyang.li@nxp.com>
2023-10-30 15:58:08 +08:00
Ming Qian
46080cc6d8 LF-7711-7: imx8m: vpu: unlock semaphore when encode/decode timeout
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>
2023-10-30 15:58:08 +08:00
Ming Qian
07326c1956 LF-7711-4: imx8m: vpu: request irq without shared flag
there is no need to share vpu irq

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2023-10-30 15:58:07 +08:00
Ming Qian
cf5d8485eb LF-7711-1: imx8m: vpu: fix a typo in switching to blkctl
the node name of blkctl may be "blk-ctl" or "blk-ctrl"

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2023-10-30 15:58:07 +08:00
TaoJiang
7ad5a0a1f2 LF-7280: amr64: imx8mq: vpu: solve 8mq suspend problem
1.add registers protection when suspend
2.add sem to ensure save work scene after one decode operation

Signed-off-by: TaoJiang <tao.jiang_2@nxp.com>
2023-10-30 15:58:07 +08:00
Zhou Peng
914a53fda7 LF-7016-1: arm64: imx8m: vpu: change file mode to 644
Change file mode to 644 to comply with community rule.

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:06 +08:00
Zhou Peng
5690b00e70 LF-6674-2: arm64: imx8mq: vpu: enable voltage adjustment
Change voltage to 1.0v when clock >= 600MHZ

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:06 +08:00
Zhou Peng
b9a0ede402 LF-5670-3 imx8mq: vpu_dec: skip blk-ctrl operation in vpu
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>
2023-10-30 15:58:05 +08:00
Zhou Peng
45e01ae590 LF-5789-1: arm64: vpu: 8mq: remove calling of force_uaccess_xxx()
Remove calling of force_uaccess_xxx() since set_fs was not supported again

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:05 +08:00
Zhou Peng
dfad614f0c MLK-25290: arm64: imx8mx: vpu: remove dependence to device_cooling
replace device_cooling notifier with thermal_of_cooling_device_register()

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:00 +08:00
Zhou Peng
7de9dbf02c LF-3332-1: arm64: imx8: vpu: fix build errors due to API change
hantro g1/g2/h1/vc8000:
replace get_fs()/set_fs() with force_uaccess_xxx()

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:00 +08:00
Zhou Peng
63f1a87368 MLK-24009-4 arm64: imx8mq: vpu: g1/g2: fix build issue as module
fix clk use-after-free issue

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 0d1b3814c9)
2023-10-30 15:58:00 +08:00
Zhou Peng
68942305c6 arm64: vpu: hantro: remove legacy ioremap_nocache interface
replace ioremap_nocache with ioremap
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>
2023-10-30 15:57:59 +08:00
Zhou Peng
7fd54570a7 LF-521: mxc: hantro: [All]arch64 kernel default build using imx_v8_defconfig has many Warnings.100%
Add 'break' statement to fix 'implicit-fallthrough' compiler warning

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:57:59 +08:00
Zhou Peng
f19cff329f vpu: hantro: fix build error when enabling 'CONFIG_DEVICE_THERMAL'
comment undefined function hantro_update_voltage() which was already disabled due to other build issues.

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:57:58 +08:00
Zhou Peng
71baec81f3 arm64: vpu: m850d: hantro
Add hantro decoder driver:
drivers/mxc/hantro
include/linux/hantrodec.h
include/uapi/linux/hantrodec.h

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
[ Aisheng: squash a few small fixes ]
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2023-10-30 15:57:58 +08:00