[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>
This commit is contained in:
Rimon Xu
2018-05-04 11:40:21 +08:00
committed by Herman Chen
parent 4863d54ff3
commit fb73f23f53
13 changed files with 82 additions and 24 deletions

View File

@@ -34,7 +34,8 @@ MPP_RET mpp_buffer_import_with_tag(MppBufferGroup group, MppBufferInfo *info, Mp
if (p) {
// if group is specified we need to check the parameter
if (p->type != info->type || p->type >= MPP_BUFFER_TYPE_BUTT ||
if ((p->type & MPP_BUFFER_TYPE_MASK) != info->type ||
(p->type & MPP_BUFFER_TYPE_MASK) >= MPP_BUFFER_TYPE_BUTT ||
p->mode != MPP_BUFFER_EXTERNAL) {
mpp_err("mpp_buffer_commit invalid type found group %d info %d group mode %d\n",
p->type, info->type, p->mode);
@@ -259,7 +260,7 @@ MPP_RET mpp_buffer_group_get(MppBufferGroup *group, MppBufferType type, MppBuffe
{
if (NULL == group ||
mode >= MPP_BUFFER_MODE_BUTT ||
type >= MPP_BUFFER_TYPE_BUTT) {
(type & MPP_BUFFER_TYPE_MASK) >= MPP_BUFFER_TYPE_BUTT) {
mpp_err_f("input invalid group %p mode %d type %d\n",
group, mode, type);
return MPP_ERR_UNKNOW;