When there are a lot of buffer groups created the search speed will be
slow. We should use hashtable to speed up.
Change-Id: I9ceeaa5a72eedf81597eeb83b34d417c74ceae04
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When C++ global destructor is called MppBufferService and MppMetaService
maybe be called before other destructors which may call mpp_buffer_put
and mpp_meta_put. So we mark finished flag after ~MppBufferService and
~MppMetaService is call and so not free corresponding data again.
This case usually happens when user call exit() directly.
Change-Id: I997c49b095e443b061fca230587b6216f710d31c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add offset set / get function to MppBuffer
2. Add U32 register address converstion function.
Change-Id: Id297b7a05e47d4e249f5e33c1924a0539729c808
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Optimize mpp_dec parser thread wait mechanism to reduce cpu overload.
1. Add mpp signal notify flag
2. Add mpp_dec wait status flag
3. Compare the notify flag with wait status flag. When there wait
condition is fulfilled then signal parser thread to process.
This will greatly reduce cpu overload by block wake up with no sense.
Change-Id: I38da718e80d0487e0300e807bc87cdb1aa070471
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Fix MppBufferService dump print error on buffer type. The v4l2 type has
changed to external dma-buf type.
Change-Id: I02c9e2741117efc6e9d84d239a26a28dde3471d4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When mpp codec thread go into idle status for lack of buffer new buffer
commit or create should wake up the codec thread to check again.
Change-Id: I843f7c790e1f8b8dcd67e209077f2475c8e265c8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Each of the different alloctor has different alloctor modes,
such as allocating physical continuous memory, secure memory,
etc.
Change-Id: Ib032689f0cfd36b494843dcc176a22c6c9587b6a
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Add log record for mpp_buffer_group_reset and mpp_buffer discard.
Add log when normal group became orphan group.
Change-Id: I08127efae9f9587693c012816aa4e48de50a61c4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. mpp_buffer_test will crash on legacy buffer non-released. It is
fixed now.
2. Release misc buffer group if it is empty.
Change-Id: Ib8eae910b0167c952d0555389ad65db82a2dbbbf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Use finalizing flag to disable print on MppBufferService destroy.
Change-Id: I8f17a6b8ed77101cf4f240dad05f8e886968c3c6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Do NOT create misc group on library loading.
2. Only create misc group on required.
3. Support both ion and drm now.
Change-Id: I7479f06e8ba6b5568bca5e2173efaa06cef70597
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add caller parameter to all mpp_buffer functions.
Change-Id: Ibebd2a31b302988fe1ed480de575189ce57e41a5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
use fromdos to change file type, remove ^M in code.
Change-Id: I000202dc51fcff57cc0771455baebea595115b1d
Signed-off-by: Lin Kesheng <lks@rock-chips.com>