Commit Graph

23 Commits

Author SHA1 Message Date
Ming Qian
0babf9a287 MA-22424-3: mxc: vpu: hantro_845: 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:52 +09:00
TaoJiang
5db030bb6e LF-8969: vpu : hantro_845: optimize 32 bit interface
1.optimize 32bit userspace pointer

Reviewed-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: TaoJiang <tao.jiang_2@nxp.com>
2023-10-30 15:58:09 +08:00
TaoJiang
eb1c03f3fd LF9067: vpu: hantro: optimze 845 decoder suspend
1.use semaphore instead of global variable
2.add up operation after wait irq timeout

Reviewed-by: Ming Qian <ming.qian@nxp.com>
Signed-off-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
afb217dbd5 LF-7711-6: imx8m: vpu: check frame done in isr
the decoding is finished only when the frame done bit is set

only check the frame done interrupt on 8mp,
as 8mq support some legacy format,
as for the legacy format, the frame done interrupt may be missed

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2023-10-30 15:58:08 +08:00
Ming Qian
2850260770 LF-7711-5: imx8m: vpu: power on one core for one instance
there is no need to power on both 2 vpu core
when opening 1 instance

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2023-10-30 15:58:07 +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
59b50d5f3b LF-7711-3: imx8m: vpu: don't disable irq
there is no need to disable irq

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2023-10-30 15:58:07 +08:00
Ming Qian
3e43c1f22c LF-7711-2: imx8m: vpu: remove unused mutex
the dev_mutex is only used for pm_rumtime_get_sync,
it's useless

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
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
746c9a05f2 LF-5789-2: arm64: vpu: 8mm: 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
Shijie Qin
cc6534bcde LF-5670-2 imx8mm: vpu_dec: skip blk-ctrl operation in vpu driver
Due to currently blk-ctrl driver implement for imx8mm only, but imx8mp
and imx8mp share g1/g2 vpu driver, hence, need parse power-domains
node to decide handle blk-ctrl or not.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:04 +08:00
Shijie Qin
be7927a4f8 MLK-25757 imx8mm: vpu:g1/g2: support disable g1/g2 individually
Support disable g1/g2 individually in dts.
There is no binding of core index, dynamically set it according probe
sequence.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
2023-10-30 15:58:03 +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
1847e523bb MLK-24373-2 arm64: imx8mp: vpu: g1/g2: fix potential deadlock issue
Replace spin_lock() with spin_lock_irqsave() to avoid potential deadlock

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 85b5d239b0)
2023-10-30 15:58:00 +08:00
Zhou Peng
f7b6e15d81 MLK-24373-1 arm64: imx8mp: vpu: g1/g2: fix blocking issue in suspend
HW enable and disable are shared with the same function, driver need to
check the parameter to identify whether HW is enabled or not

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 742c7adea8)
2023-10-30 15:58:00 +08:00
Zhou Peng
4592554579 MLK-24009-2 arm64: imx8mp: vpu: g1/g2: fix build issue as module
release clk to avoid memory leak

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 76d95bf263)
2023-10-30 15:58:00 +08:00
Zhou Peng
020aebfa5f MLK-23723: arm64: imx8mp: vpu: fix g1/g2 timeout during suspend/resume
When suspend happen between enable-HW and wait-HW-ready, user can't
fetch correct HW registers value after resume due to power off in suspend.
So drvier should explicitly restore and restore HW registers during
suspend/resume.

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 1f9442d519)
2023-10-30 15:57:59 +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
8479fceca4 vpu: hantro: add decoder for imx845
add hantro 845 source code, include g1/g2

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
[ Aisheng: merge Kconfig&Makefile changes ]
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2023-10-30 15:57:58 +08:00