Commit Graph

12 Commits

Author SHA1 Message Date
Herman Chen
b845d7740d [mpp_device]: Fix cmd_butt check error
Change-Id: I247bb3573812903c6bc478cdad17c9e21f515104
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 15:41:41 +08:00
Herman Chen
6d2128f9f7 [mpp_device]: Separate kernel interface define
Move vcodec_service and mpp_service kernel ioctl interface definition
into different headers.

Change-Id: I1aa77d1073e7c51b48d18cf8d16fd76644d23d38
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 15:20:06 +08:00
Herman Chen
e04f0e83e7 [mpp_platform]: Improve ioctl version detection
Move kernel ioctl api version detection to library loading stage.

Change-Id: If8ee750e1eaefb99924fd622d03270ef5032d1be
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-25 09:35:00 +08:00
Ding Wei
7d05e33de8 [mpp]: add /dev/mpp_service support
Add a new ioctl mode for kernel-4.19 or later.
Tips:
    1. There will be only one device /dev/mpp_service in kernel.
       User should use client type to distinguish different device.
    2. Each codec use the same function as before.
    3. Ioctl magic changes from VPU_IOC to MPP_IOC.
    4. Update structure for ioctl argument.
	Original structure:
	    data_ptr | size
	In this mode has many sortcommings:
	a) Need many ioctl cmd for different requirements.
	b) Data_ptr not to differ library for 32 or 64 system.
	c) Contain only one info ioctl once.

    New data structure:
        cmd_type | flags | size | offset | data_ptr
    a) Cmd_type works like previous ioctl cmd.
    b) Flags is extend to mark current data for any purpose.
    c) Size is the same as before.
    d) Data_ptr use 32 bits build in 32 system while 64 bits in 64 system.

kernel-4.19 related commit:
ib94ac0df876dfcc786b25ed3de6a68d861d2ef1e
cda9d27c62017309519bcbf8fe91057dfdc21076

Change-Id: I13d54a2e4823b7378265f100540916a22f62b9d4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-12-10 20:12:50 +08:00
Herman Chen
3a3e110de6 [mpp_platform]: Add device id definition
Change-Id: I108cfa3f4639517eed7ebaaaacf5f482002ea806
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-10-14 16:36:25 +08:00
Herman Chen
d17861b67b [rk_mpi.h]: Separate rk_mpi_cmd.h into two headers
1. rk_mpi_cmd.h will contain cmd value only.
2. rk_venc_cmd.h will contain all the encoder command structure.
3. Move MppCtxType and MppCodingType to rk_type.h for better include
dependency.
4. Add MppEncRefCfg to MppEncCfgSet.
5. Remove rk_mpi.h dependency inside mpp.

Change-Id: I6b972738100fb60c0a6a9b7cfe0a012abf4205b7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-06-26 10:09:23 +08:00
Herman Chen
cd9a1cca3f [misc]: Change interface header file dependency
Move MppCtx, MppParam, MppFrame, MppPacket, MppBuffer, MppBufferGroup,
MppTask and MppMeta to rk_type.h.

Later development need to bring in cross reference between these
objects. So we choose to move these declaration together.

Change-Id: I7ea39138ca87d6ca4cb86556464a5de89d172846
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-06-14 10:15:12 +08:00
leo.ding
b7cbd8a9c0 [mpp_device]: add MppDevCtx for control device status
1. add Mppdevctx to store some infos in every codec.
reason:each codec has its own unique characteristics.
2. add mpp_device_control interface for get or set ctx values.
reason:it simplity interface, which flexible, easy to use and versatile.

Change-Id: I56c9332768c86f62a3ca248ad254fba9e798c577
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-06-07 15:14:30 +08:00
leo.ding
8cd076afae [mpp_platform]: rename HAVE_265E to HAVE_265ENC for buid warnnig
H265E had defined in Cmakelist.txt to choose whether build
h265 encode module, so it here is redefined.

Change-Id: I54e9704d396d0a8a0e6d0f2ae8595d033131d81b
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-05-15 17:28:16 +08:00
Herman Chen
4b41fdd8bc [mpp_platform]: Modify chip vcodec detection
1. Add video codec information and kernel driver device detection code for all
supported chips.
2. Add video codec type and device name detection test

Change-Id: I275c0e616acd80c9a4ad2fee00588479e47a92db
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-03-03 16:12:36 +08:00
leo.ding
b0902117fc [osal]: Add hardware platform detection
Change-Id: I0223b79608a9ea8346dbf194805c2536a90beb3b
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-01-06 09:06:54 +08:00
Herman Chen
2fc024529e [osal]: add environment detection function
1. add software runtime detection
2. add hardware platform detection

Change-Id: I75736ae85130325029023d948e4d756e27953af8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-08 18:22:29 +08:00