Commit Graph

7 Commits

Author SHA1 Message Date
Herman Chen
e855cb171a [misc]: Fix some minor issues
1. Fix rga.cpp compile error on Linux.
2. Fix mpp_runtime.cpp warning on Linux.
3. Remove print when fail to dlopen vpuapi library.

Change-Id: I3891bdd39ae77bac68a67a39893d8caa31dbe6fb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-05-09 16:23:09 +08:00
Rimon Xu
fb73f23f53 [alloctor]: add flags for alloctor
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>
2018-05-07 17:34:34 +08:00
Randy Li
a78598dab5 [osal]: add new buffer type for DMA import buffer
This buffer type is used for the buffer coming from the
application, the application should make sure those
buffers are the dma buffer.

Change-Id: I2c8491f4dea77e5d7ae8d9157b0a1eda204f4bd6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2018-04-27 17:20:32 +08:00
Herman Chen
7b7b509847 [runtime]: Add more runtime detection
As we found that simple ion / drm device detectioin can not cover all the
case. For example on some 3368 platform kernel provide both ion and drm
device. We have better to use allocator chosen in dts.

But later kernel patch from Randy will bring unified dma-fd translation in
kernel then this detection will be removed.

Change-Id: I2746142d1c3d0f36791bacaadb231dc2001a5aa7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-01-03 16:48:56 +08:00
Herman Chen
7d29f32280 [osal]: Add runtime allocator detection function
Due to complexity of different kernel and usespace combination
we have to detect drm and ion allocator on runtime. The HAVE_DRM
flag may not be trust at all time. So we add a simple detection
function on first run.

Change-Id: Id4f6b2278ee0fe50ffc9806fffc5b01267f723da
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-12-18 15:15:07 +08:00
Randy Li
e0a1d6579d [drm]: use mmap() in native way for GNU Linux target
The "[drm]: fix runtime error for 32bit library" is hack way,
it won't work at GNU Linux platform. Also you need to check
_FILE_OFFSET_BITS and _LARGEFILE64_SOURCE before use the
mmap64().

For the normal mmap() with glibc, we only request to
check offset is aligned with page size but not the lenght.
But that doesn't apply for the memory from the drm device,
also the android use a different rule.

I decide not to map all the buffer to cpu at beginning
since most of them won't be access by the cpu.

Change-Id: I74ac7b5b63d45029cae076985a3d0b4526c62bbc
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-10-27 10:06:20 +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