Commit Graph

3625 Commits

Author SHA1 Message Date
Johnson Ding
bd5aa46c51 [avs2d]: Optimise dec result when player seeking
Change-Id: I92565bb05956276f0f626f9293d70e8b38211209
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
d5061c90aa [hal]: Add ref using mark at Hal task
Change-Id: Ic4a71c7fdffdfa3da7129a8b641f311442cb1325
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
d98fbcfe2a [mpp]: Activate AVS2 decoder
Change-Id: I7fb596b050c1791b046f6c2179e8775a8b3df068
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
20866b909d [hal_avs2d]: Add AVS2d hal module
Change-Id: I8c16a843a7440281cd85dbdab9fc6de8222fa5f5
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
0f11ae4580 [avs2d]: Add AVS2 parser api
Change-Id: I18b890698b236d47189b5e2545ea251deeabf6fd
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
2022-07-19 15:24:34 +08:00
Herman Chen
e520b00c94 [mpp_enc]: Fix segment number error on reenc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8b2d4bc086b19cc51717b7251551e97c3a688f38
2022-07-19 15:19:08 +08:00
Herman Chen
e64b30720c [mpp_packet]: Add set segment_nb function
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I1aa75c6811e148bbca0d366a33e8823e7764a72e
2022-07-19 15:18:47 +08:00
sayon.chen
1fa5d10ee9 [vepu_580]: When slice num < 32 disable slice irq
Change-Id: I9aeb445ea4da2d778046f1e740f0e45b8c6f5141
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-19 15:14:07 +08:00
sayon.chen
193018982c [hal_jpeg2_v2]: Fix multi core rotation cfg issue
Change-Id: I312cf6952483c39ce65f8dad1e9dff7d0c26ea65
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-18 11:46:03 +08:00
Johnson Ding
20cee9cdd4 [vdpu34x]: add more bits and registers definition
Change-Id: Ie9a84e998e6524fe94a783b6998db1b90013ac07
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-13 14:45:27 +08:00
Herman Chen
466ae8cf1c [hal_jpege_vepu2]: Fix multi-core jpege error
When 4 cores paralled jpeg encoding enabled the restart_ri should round
up to 4 times of rows.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: I7f72b776f09c60323f8730cc63b1d28cb6db56c9
2022-07-13 14:26:51 +08:00
Herman Chen
36e83a4e2a [hal_h264e_vepu580]: Fix async segment type error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7fa9354b5f906a3485e9102b2592600dda91bf56
2022-07-13 14:26:38 +08:00
Herman Chen
6ac0175b19 [hal_jpeg2_vepu2]: Remove extra delimit ioctl
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I93cb9e2dd3563b196c8881ce8783b439f30290d5
2022-07-12 11:26:40 +08:00
Xinhuang Li
ee624b0041 [mpp_cfg]: fix mpp_enc_cfg_set_ptr segmentation fault
The err stack dumped as follows:
  0x0000007f9d8f7618 in jpege_proc_jpeg_cfg.isra ()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9d8f78a8 in jpege_proc_cfg ()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9d8a2244 in mpp_enc_proc_cfg(MppEncImpl_t*, MpiCmd, void*)()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9d8a2f5c in mpp_enc_thread ()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9e5b1df8 in start_thread () from /lib64/libpthread.so.0
  0x0000007f9dab851c in ?? () from /lib64/libc.so.6

Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: Ibe7f0d43dee06dcb480cc5295705c4a2f339d067
2022-07-12 11:10:13 +08:00
shine.liu
797536f816 [mpeg4d]: Fix crash of stack overflow
bug: tmp[i] = 0 --> tmp[256] = 0

Change-Id: Iff3a6f5b78413358d0793ea48eaa9142e8781143
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
2022-07-12 10:23:33 +08:00
Herman Chen
3d282d8200 [hal_vepu580]: Disable split on pass1 process
The pass1 work flow MUST NOT output in slice lowdelay mode.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I26a6b7b90cec88829997ccee061cada6068bc462
2022-07-12 08:52:40 +08:00
Herman Chen
47cac796fe [hal_jpegd]: Fix kernel register size check log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I85cd1e83ab6612a849f95a27f7954b2404ecf9c1
2022-07-12 08:51:50 +08:00
Herman Chen
c409759389 [hal_jpege]: Fix client type check error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Icf083adbe58502f6d576efa83817c1fad38ac219
2022-07-11 15:46:37 +08:00
Herman Chen
cb5a139696 [mpp_enc_cfg]: Set rc:max_reenc_times default to 1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7fd0ca5c6e8cbe3f0e557acee560b00fb2b59a48
2022-07-08 16:31:36 +08:00
Rimon Xu
25cbe2ce2e [mpp_dec] Calc FBC buffer size on SET_FRAME_INFO
Determine FBC alignment when set frame info control

Change-Id: Ibc0c6c455029a58875b820c17b7d94cc4e64cdda
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-07-08 15:50:41 +08:00
sayon.chen
d0a89e5c75 [hal_jpege_vepu2]: Support parall enc for rk3588
Change-Id: I1fa21ba811c8ad59ab326348288672fdefe979c0
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-07 11:44:22 +08:00
Yandong Lin
512fe021ee [mpp_enc]: bypass dts from frame to packet
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib51a106adedefc7af9f375ed59dd78aa5a3f26b8
2022-07-06 11:01:19 +08:00
Yandong Lin
eed29f8184 [hal_vp9d_api]: hal_vp9d_rkv do not support fast mode
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I73a2118a044e90e941fcb57d14e99fe086255c53
2022-07-06 11:00:36 +08:00
Yandong Lin
9ddf4fa53c [hal_av1d]: fix av1 dec err
Av1 dec do not support fast mode.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4da00e82068ead52b0881436e1f4eb7c6e8d2eb6
2022-07-06 11:00:10 +08:00
sayon.chen
eee9b87c30 [vepu541]: Support fbc_hdr_stride from frame info
Change-Id: Ibe7644dd7bb3ae334821af70fee5c006a6b46549
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-05 15:31:47 +08:00
toby.zhang
8fd9a478ba [hal_vepu580]: Add hw config implemnet
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: I40f9d781fb2fe88a35329141d788e2d6fa38ab9b
2022-07-05 14:57:09 +08:00
Herman Chen
61fbfb82cd [mpp_enc_cfg]: Add hw config for block mode
NOTE: Only for vepu580

Change-Id: Ic186ad014b734b5df01ae3218ed3d7219729c1ee
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-07-05 11:45:03 +08:00
xueman.ruan
652e18fcf0 [allocator]: fix dma_heap allocator
segment fault happened in mpp_allocator_put.
 #00 pc 00102e14  /vendor/lib/libmpp.so (mpp_allocator_put+272)
 #01 pc 0004705c  /vendor/lib/libmpp.so (MppBufferService::~MppBufferService()+536)

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ia4f9a3b4823bf6a5d8f3fdfd85055630222c0b43
2022-07-04 17:05:59 +08:00
Yandong Lin
def09cb3c2 [jpege]: add new client type for vepu2 jpeg only
Add VPU_CLIENT_VEPU2_JPEG to distinguish vepu2 jpege only device.
And check whether kernel support the client type or not.

rk3588 has 4 jpeg encoder core and we will use VPU_CLIENT_VEPU2_JPEG as
its client type in kernel.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib1c45781ac9c8f504ba7b46f2f0c7aad5d16fa68
2022-07-01 16:43:19 +08:00
Herman Chen
8ce07dbfba [hal_vepu580]: Add slice segment info output
Change-Id: I79a036b6ed5c75b587564a91f392ac81f305e505
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-01 15:14:35 +08:00
sayon.chen
5fc54796c8 [vepu_580_hevc]: Fix set one slice output issue
Change-Id: I5393ed8a7cdb4b8cbd9178a25422d8f5f3e0ef02
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-01 15:13:48 +08:00
Zhihua Wang
ecbf315ac3 [inc]: Update rk_mpi_cmd compatible for rockit
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
Change-Id: I0658e15a085217f0feee4177f7fd6731487ae7ee
2022-07-01 11:08:50 +08:00
sayon.chen
0ea1fe692f [hal_vepu_h265e]: Fix chrome qp offset set issue
Change-Id: I9f1a23872990b7f4c72b7a321ee5d9d4719845c9
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-01 09:50:15 +08:00
Yandong Lin
d1fbc475fa [allocator_dma_heap]: fix compile err for linux/aarch64
Err notes:
    mpp/osal/allocator/allocator_dma_heap.c:26:27: fatal error:linux/dma-buf.h: No such file or directory

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib5f0aa77f36adfd3bea98ff16de8000a82f49720
2022-07-01 08:57:18 +08:00
xueman.ruan
5e96daffb2 [h265d_parser]: avoid segment fault
pps_id out of range result in segment fault.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I0281eb83584d265d5a016fd157c24f3f8917dee9
2022-06-30 18:31:09 +08:00
sayon.chen
fee2bdb0e8 [vepu580]: Add range reg set
Change-Id: I3d54a6fd013fdbca613d98680e5580de965c696b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-30 18:15:01 +08:00
xueman.ruan
c967fba6cf [vp9d_vdpu34x]: reallocate buffer
Simplifying the process of buffer_get/put

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I875958c9ff1b51ad1389beacd494d5b80181c03c
2022-06-30 14:20:56 +08:00
xueman.ruan
9093217206 [mpp_service]: Remove extra ";"
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I63bdaccd5e3b6318a69373e89f32da98acf1f331
2022-06-30 14:09:36 +08:00
Herman Chen
60f5fc234a [allocator]: Add dma_heap allocator
The dma_heap is introduced in kernel 5.10.

Change-Id: Id3c116d996da461467fe380a79434ba5ea875033
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-24 15:52:06 +08:00
Yandong Lin
8e15a4a492 [mpp]: Fix get_packet_async return value err
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I2fd6bbe303e57aaeac64621648e7d8203be753f7
2022-06-24 08:59:04 +08:00
Herman Chen
d1da307afc [mpp_packet]: Add segment info copy function
Change-Id: I8349fe487cfc3e795d43d374469863db48a55a33
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-23 16:16:02 +08:00
sayon.chen
58a4c06ab5 [vepu580_hevc]: Add frame crop set to reg
Change-Id: If93a55c5570c80b555cad9d65be5c4bf6655139a
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-23 11:41:48 +08:00
Herman Chen
e2072abcb8 [drm]: Remove drm_fd_to_handle on import
Remove drm handle to reduce iova usage.

Change-Id: Ie5000cb594806c9c7cc97f8ff7e25a4ba61f721a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-23 09:25:16 +08:00
Herman Chen
cf32c96d42 [mpp_enc]: Encoder async IO mode add 10ms timeout
Change-Id: I7477a32080c19bb05c1a9d9d7596925ed9ffbbaa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-22 11:03:30 +08:00
Herman Chen
188dfb5d20 [mpp_enc]: Add intra flag on slice output mode
Change-Id: Ib717b7df596ab6ffb35ba0c2f4274dc9ef79850d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-17 18:19:30 +08:00
sayon.chen
2da4ad7b1e [vepu580]: Support fbc_hdr_stride from frame info
Change-Id: I6d5a3ff60b7d251f5d2b2605f7e25b6d67a74222
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-16 09:36:03 +08:00
sayon.chen
6304f44f65 [rkv_dec]: Add fbc_hdr_stride to output frame
Change-Id: Ia5ab37c86f396848e0cc28a0c824c040835e7977
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-16 09:29:47 +08:00
sayon.chen
b05ba20d75 [mpp_frame]: Add fbc hdr stride set & get function
Change-Id: I9414f484451722228fa460dc33586851da1a0ec2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-16 09:27:47 +08:00
sayon.chen
3e6ff53bf3 [mpp_enc]: Update force IDR if cur frame is skip
Change-Id: I4ad6cda67b2b14cb703d43f16e130047b1b27b13
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-15 18:50:11 +08:00
Hongjin Li
7c340c8885 [mpp_dec]: update base cfg to decImpl
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I6a05657ff921f6652a7641053fdaf2facd1bfd3c
2022-06-15 17:25:30 +08:00