ion: msm: Add support for the audio carveout heap

Define a new carveout heap that will be used for audio
usecases.

Change-Id: I7da5e3c32f9bd8ba0d8cdcb6b8a1521b420c3d4a
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres 2021-04-28 13:27:13 -07:00 • committed by Gerrit - the friendly Code Review server
commit 4f26f89c9c
3 changed files with 9 additions and 3 deletions

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/err.h>
@ -97,6 +97,10 @@ static struct ion_heap_desc ion_heap_meta[] = {
.id = ION_AUDIO_ML_HEAP_ID,
.name = ION_AUDIO_ML_HEAP_NAME,
},
{
.id = ION_AUDIO_CARVEOUT_HEAP_ID,
.name = ION_AUDIO_CARVEOUT_HEAP_NAME,
},
};
#define MAKE_HEAP_TYPE_MAPPING(h) { .name = #h, \

View file

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2011 Google, Inc.
* Copyright (c) 2011-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2021, The Linux Foundation. All rights reserved.
*/
#ifndef _MSM_ION_PRIV_H
@ -41,6 +41,7 @@
#define ION_TUI_CARVEOUT_HEAP_NAME "tui_carveout"
#define ION_DISPLAY_HEAP_NAME "display"
#define ION_AUDIO_ML_HEAP_NAME "audio_ml"
#define ION_AUDIO_CARVEOUT_HEAP_NAME "audio_carveout"
/**
* Debug feature. Make ION allocations DMA

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*/
#ifndef _MSM_ION_IDS_H
#define _MSM_ION_IDS_H
@ -31,6 +31,7 @@
#define ION_SPSS_HEAP_ID ION_BIT(14)
#define ION_SECURE_CARVEOUT_HEAP_ID ION_BIT(15)
#define ION_TUI_CARVEOUT_HEAP_ID ION_BIT(16)
#define ION_AUDIO_CARVEOUT_HEAP_ID ION_BIT(17)
#define ION_SYSTEM_HEAP_ID ION_BIT(25)
#define ION_HEAP_ID_RESERVED ION_BIT(31)