Commit Graph

9 Commits

Author SHA1 Message Date
Herman Chen
8db63d761a fix[common]: Add mpp_dup function
mpp_dup function use fnctl F_DUPFD_CLOEXEC for fd dup with CLOEXEC flag.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Idd82eb935b06d2885685aeb696b95e910981539d
2024-01-10 18:15:45 +08:00
Herman Chen
6ce3007994 refactor[allocator]: Refactor allocator flow
1. Allocator api is determined by buffer type.
2. Allocator ctx is determined by both buffer type and buffer flags.
3. All allocator dma_heap / drm / ion / ext_dma should support different
buffer flags.
4. The buffer flag supports cacheable / 32-bit / contig options.
5. Add flags update flow on allocator create process.
6. Add mpp_dmabuf_has_partial_ops to disable dmabuf partial ops when the
kernel driver has bug.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If36a05c6704112cad3ab46861023597ff02bf14c
2023-11-29 09:54:36 +08:00
Yandong Lin
e155a7eac7 fix[dma_heap]: add dma heap uncached node checking
Currently only support uncached dma heap node access,
because of the cache processing is not yet complete.

So if there are no uncached node in /dev/dma_heap/ path,
mpp will not use dma_heap allocator.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic33fca9c445c7668a86454f01f9d7577668de32b
2023-11-29 09:54:36 +08:00
Herman Chen
feab136f1a [allocator_dma_heap]: Add error log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I06af727713e1c096eada8a40795f42668fdaff6d
2023-06-06 15:48:43 +08:00
xueman.ruan
c794d353c5 [allocator_dma_heap]: add file permission check.
Change-Id: Icfffaf3594f029b87e3a87f17de408a681c49dfb
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-05-04 08:57:02 +08:00
xueman.ruan
062c175265 [hal_jpege]: Add dma heap options for JPEG encode.
use cachable dma buffer to reduce copy time.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I7fcc0fa5942ea5aa4e247b5f10677843d006ff28
2023-02-21 20:57:26 +08:00
Rimon Xu
1cc1af1b08 [osal]: reorder dma heap type select priority
Change-Id: Ifd2286ecf97fb4477693c24cdaec10c1df15eacf
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-10-28 10:06:22 +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
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