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
This commit is contained in:
Yandong Lin
2023-08-29 10:47:23 +08:00
committed by Herman Chen
parent ce39aff31f
commit e155a7eac7
2 changed files with 148 additions and 79 deletions

View File

@@ -147,6 +147,9 @@ MPP_RET mpp_allocator_get(MppAllocator *allocator,
.flags = flags,
};
ret = p->os_api.open(&p->ctx, &cfg);
/* NOTE: allocator may update the flags for compatibility */
p->flags = cfg.flags;
}
if (MPP_OK == ret) {
pthread_mutexattr_t attr;