Commit Graph

10 Commits

Author SHA1 Message Date
Yandong Lin
5b1156a47b [vcodec_service]: Fix array out of bounds issue
Note:
1. In kernel 4.4 and previous version, the array may cross the boundary
and cover an unknown memory address
2. The array is out of bounds caused by the following submission:

 commit 5be47f31f0
  Author: Yandong Lin <yandong.lin@rock-chips.com>
  Date:   Wed Feb 24 19:44:32 2021 +0800

      [hal_vdpu]: Support fd and offset to be set separately

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie3fc4324dde497732424cf3023ce81997401fd96
2021-04-09 11:12:56 +08:00
Yandong Lin
f2231d1473 [mpp/vcodec service]: Check whether the offset is configured repeatedly
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I217a138b62a7a17f7f371d76a591a02852950a10
2021-03-12 11:39:27 +08:00
Yandong Lin
5be47f31f0 [hal_vdpu]: Support fd and offset to be set separately
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I38214c5d692fce76b60fe71536fab9863605e64e
2021-03-05 14:22:35 +08:00
Ding Wei
0d6a0e28d5 [mpp_device]: add MPP_DEV_RCB_INFO for rkvdec34x
Change-Id: I0fe59f27f74fdd6a5eafd91b91870fdbf1253e33
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-13 18:25:28 +08:00
Johnson Ding
873f509da9 [osal]: Fix encoder not working problem at vepu2
For vepu2, kernel 4.4 and previous version, '/dev/vepu' should be used
rather than '/dev/vpu_service'.

Change-Id: I2efd4a219bbd7dd3cebf226c8ebcede9bcff9823
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-12-23 10:10:11 +08:00
Herman Chen
c106a5bdd0 [mpp_soc]: Add mpp_soc with more detail feature
1. Add soc definition structure to replace old one.
2. Use mpp_soc.h to replace soc detection in mpp_platform.h.
3. Add vcodec_type to each device definition.
4. Add check on soc info init.

Change-Id: Iecc44bd79e6fd09c58afbc1b5c526ecf31acc663
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
2f2e4224b9 [mpp_platform]: Move codec_type detection
1. Move codec_type detection code to vcodec_service.
   Only vcodec_service needs to detect vcodec_type. Mpp_service will
   report this flag from kernel.

2. Remove kernel device detection code when soc type not detected.

3. Add mpp_soc.h for soc definition.

Change-Id: Ic83897bddbcf0fceb0c5d19a05491f75231092c1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-25 15:11:28 +08:00
Herman Chen
af6938b235 [mpp_device]: Move mpp_device to osal
Change-Id: Ia196f01945d47c24e821da8935f3694834afa839
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
Herman Chen
3f8e880a39 [hal]: Use new mpp_device interface in hal
Switch all hal module to new api.

Change-Id: I066da7e06c999a01b80ee193365c5752e9bb19aa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
Herman Chen
44443dd7ee [mpp_device]: Add new mpp_device for kernel driver
1. Change mpp_device into a new layer for kernel drvier.
2. Separate mpp_service driver and vcodec_service driver.
3. Add mpp_service.c for /dev/mpp_service driver support.
4. Add global mpp_service info query interface.
5. Remove unused function in mpp_device.c

Change-Id: I3f53bba3aef525ad3b1f450bb55830d1eeaf29a6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-03 16:09:19 +08:00