Commit Graph

3026 Commits

Author SHA1 Message Date
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
13b4f27390 [mpp_dec]: Use callback to handle hardware status
Change-Id: Iff972f276f00621dc0289633178e487d897b2e0e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
02e1d717c8 [mpp_callback]: Add callback module
Callback module is used for async communication between different
modules.
It should be used only when there is no better way to use.

Change-Id: I2d30252e63ade3be953339a2d4568047e4e228e8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
134de17b36 [mpp_dec]: Sync mpp_dec_control process
Add mpp_dec_proc_cfg in parser thread. The external control will be sync
in decoder thread.

Change-Id: Ic680f055fd1568815fe9f28b62c8ddcc837311bc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
d9c59b7c0a [mpp_dec]: Add MppDecCfg ctrl process to mpp_dec
Change-Id: I767e7b248922904d61aa19afd657a5543a2b9995
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
ec99f54791 [mpp_dec_cfg]: Enable mpp_dec_cfg
Change-Id: I427366035de4c25c62e14582a2d23d25c71a3ef4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
3be3d97054 [mpp_device]: Add regs offset helper function
This helper function is for address register setup its offset.

When offset is less than 4M (20bit) the offset and buffer fd (10bit) can
be filled in 32bit word.

When offset is larger than 4M the full offset should be sent by ioctl
MPP_DEV_REG_OFFSET.

Change-Id: I5f59f3c941e41cf85fa2ab8895d2a177f4412e64
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
sayon.chen
fe89da930f [vp9_dec]: Fix 10bit stride set issue
Change-Id: I7c4b342c7229322e589dd10a0582c71dc025a3a2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
d71e3ffce9 [hal_h264e_vepu541]: Enable ccwa by default
Change-Id: I0f972af256d718ac78f813bfa5d9208d46051211
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
sayon.chen
8631f70f9a [rc_v2]: Fix outrate < 1 cause stat_bit issue
Change-Id: I66f6bfe5a087308b52c61a6b60566533a1974af5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
8c91fa0cbf [mpp_service]: Fix supports-cmd path
New kernel use /proc/mpp_service/supports-cmd

Change-Id: I7c1d258c3652ecf5346c2e19383b90975a30a629
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-01 17:25:25 +08:00
Herman Chen
e2ad911c00 [mpp_dec_cfg]: Add more decoder cfg string
Change-Id: Ic686b15f36530c7695ee907de9f72da99c30d404
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-01 16:35:20 +08:00
Herman Chen
6ff78b1bd6 [mpp_buffer]: Fix error on release orphan group
Change-Id: Ib915000941a2380c908b6c6f934b4b8bb8680fa9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Fu Yuhao <fuyuhao@sunniwell.net>
2020-12-01 16:35:20 +08:00
Yandong Lin
08fac3c3f8 [iep2_test]: fix yuv422 input issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I1fdf83672d32e1d73121c07d24479bcfc2a1dd1b
2020-12-01 08:52:38 +08:00
Herman Chen
5d648bad8b [mpp_dec_cfg]: Add mpp_dec_cfg implement
Change-Id: Ic57fb37604930e841af8cdd6784120662f529110
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
Herman Chen
a5afd38076 [mpp_dec_cfg]: Add mpp_dec_cfg header
Change-Id: I98830f3e8466ffee0d3232a8bb44694cb46b8fff
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
yandong.lin
570478924c [mpi_enc_multi_test]: Set qfactor for jpeg
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I4cde2336ea3c7ccb5724c0916aded6604888b40f
2020-11-30 09:46:27 +08:00
sayon.chen
e4f4b4f690 [vepu54x]: Compatible different device fbc input
RK isp fbc output use AFBC_V1 format.
RK rkvdec fbc output use AFBC_V2 format.
These two formats have different fbc payload offset calculation method.

Change-Id: Id050cbd58e33a1249098a2dc226d47c376d7c163
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
sayon.chen
dfe9428017 [rc_v2]: Support super frame cfg process
Change-Id: I4de4d3e27925d81f26ed5819e07d3e45ed42061e
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
Herman Chen
7ae2f73bca [mpp_enc_cfg]: Add super frame config
Change-Id: I0df2db8fd7c5e10412584ded557da3962b77f882
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
yandong.lin
c124e1c247 [vdpu34x_com]: rename rcb buffer coef
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: Id455a1d6280dc2d0ff96998ded48317ea33ecdaa
2020-11-26 09:22:30 +08:00
sayon.chen
6ced066386 [vepu54x]: Support crop set from mpp_frame
Change-Id: I2d7884889fa9390efc6a118f4328c95ec7be7576
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-26 09:06:52 +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
9956bdb1ac [mpp_service]: Add mpp_service device detection
Change-Id: Ie63d0dc9964801b1f85b3d0e289c84f89798ffb1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-25 14:11:49 +08:00
Herman Chen
a875c5a308 [mpp_frame]: Add comment for MppFrame parameters
Add comment for width, height, hor_stride, ver_stride, offset_x and
offset_y.

Change-Id: If0297eafdd550902d40485d786f9494c85123622
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 14:09:20 +08:00
Herman Chen
302582b3b9 [mpp_frame]: Add offset x/y for cropping
Change-Id: Id3da30527fe709f7f89044a667c089b3dab6ef4f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 11:53:30 +08:00
Herman Chen
85b37b9581 [hal_h264d_vdpu]: Add common header for H.264 vdpu
Change-Id: I8782ee5fff52fca25664875fe84746eb6269705a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 11:45:10 +08:00
Herman Chen
1a9aaa03f9 [hal_h265d_vdpu34x]: Reduce colmv size
1. Reduce colmv size to 1/8 of 64 aligned width * 64 aligned height.
2. Enable colmv compression by default.

Change-Id: I799f95e791f0f3a48b2b085a46350185f644850a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 10:17:55 +08:00
Herman Chen
d059a25c00 [vdpu34x]: Enlarge rcb buffer
Change-Id: I4a61d612e7926f12e65f5f8a266e658f51d21568
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
2020-11-24 10:17:38 +08:00
Herman Chen
0a88bcb413 [hal_h264d_vdpu34x]: Fix crash on field mode
When H.264 stream is field mode the colmv buffer need double size and
the colmv compression should be disabled.

Change-Id: I6933ef062cd255f00967e17356cbf40c7143eb0d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 09:32:59 +08:00
Herman Chen
fa98795992 [hal_h264d_vdpu34x]: Fix fast mode error
Change-Id: I49b33c279b25584aea045683b8cc99fc7527e9ab
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-23 15:30:45 +08:00
sayon.chen
3c5dc7fe45 [h265d_syntax]: Fix h265 syntax fill sps rps issue
Change-Id: Ifbc101a9c4755546875777978bed06a375f6cf49
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-23 14:26:16 +08:00
sayon.chen
472a0b7563 [rc_v2]: Fix pre_i_bit struct leak issue
Change-Id: I4bf173923226de5fb22d14b9ec13d673b53b1a15
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-23 14:22:28 +08:00
Justa
db2492ed9c [hal_jpege_vepu]: Fixed jpeg encode abnormal color
1. Fixed uninitialized variable(qtable[2])

Change-Id: Ibe481760cdcef25a9b8fbccc822606e006c8e679
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-23 09:53:56 +08:00
yandong.lin
a6c4efe04d [hal_vp9d]: Reconstruct HalVp9dCtx Structure
Separate HalVp9dCtx to Vdpu34xVp9dCtx and Vp9dRkvCtx

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I48618d01edba3f8b828f8904d1386347a1b833d4
2020-11-20 20:54:25 +08:00
yandong.lin
36e20cff29 [vdpu34x]: Update register naming
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I1a264b7d6ed8923779a25fc7a116fffe8877cae6
2020-11-20 17:57:58 +08:00
yandong.lin
06ef6826c4 [mpp_init]: Handle initialization failures correctly
clear resource and return when init fail

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I0fa8aa7c0742ce101127ffc26cccd0fe5809906f
2020-11-20 16:53:01 +08:00
Herman Chen
4ddca6514b [hal_vp9d_vdpu34x]: Add vdpu34x vp9 decoder
Change-Id: I93ea875788326699d4b0411805a792218fd9012a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-19 15:04:33 +08:00
Herman Chen
65eb5f980f [vdpu34x]: Add vdpu34x rcb buffer alloc function
Change-Id: Idc6912968a979fc1e37617f9877054a4f9d4dbfc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-19 15:04:33 +08:00
sayon.chen
2a6fb9fe28 [vdpu34x]: Support cmv alone set for h264&hevc
Change-Id: Iaf9a668c79c2fa34ce5dab2454df78fc912b5bf1
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-19 15:04:33 +08:00
Herman Chen
ca353b876e [hal_bufs]: Enlarge max buffer elem count
Change-Id: Ib42de8d2f206a048d2cfc7615b61789466439b20
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-18 10:49:23 +08:00
Herman Chen
7307f1bcc2 [vdpu34x]: Add clock gating by default
Change-Id: Idede84f638db679ac06af7bcdf526a9a3b7225bb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-18 09:16:39 +08:00
Herman Chen
b9eeffc293 [mpp_buf_slot]: Add buffer count query interface
Change-Id: I60afe2cb26282e461be3db366074304708b3d5d1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-18 09:02:31 +08:00
shine.liu
d1e47f8137 [hal_h263d]: Remove unused code in hal_api_h263d
Change-Id: Ia635841b353849033003c02548550e16f4dbe8d7
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
2020-11-17 09:40:42 +08:00
sayon.chen
d092c6653b [vdpu34x]: Format code style
Change-Id: I38b4bad1b2d6618d96e08ad00617bd8f6c1c5094
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-16 14:50:05 +08:00
sayon.chen
546c3f6130 [hevc_vepu54x]: Support vepu540 regs config
Change-Id: I8c7a5ab0f8d326c14a74b3fa387316b78e502574
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-16 14:46:05 +08:00
sayon.chen
db59d7a641 [hal_vepu541]: Remove unused code for linktable set
Change-Id: I5be2a3e5743de43da30f3930c6083e36de0adfc6
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-16 11:15:59 +08:00
Herman Chen
94a3803835 [hal_h265e]: Add hal_h265e_debug.h
Change-Id: I4426d0bbbb6b593b90eb25b1af269f6d26c53f93
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 10:57:39 +08:00
Herman Chen
e51c592daa [mpp_service]: Add cap check on invalid query
Change-Id: Ia89e06f13cdf00d2eddc6e6b8a6c18be86c04d2f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 10:15:31 +08:00
Herman Chen
aaba063e62 [vdpu34x]: Separate register definition
1. Add vdpu34x common register header.
2. Add vdpu34x H.264 decoder register header.
3. Add vdpu34x H.265 decoder register header.

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