tizen 2.4 release
[kernel/linux-3.0.git] / drivers / gpu / arm / mali400 / mali / common / mali_kernel_mem_os.h
1 /*
2  * Copyright (C) 2011-2012 ARM Limited. All rights reserved.
3  *
4  * This program is free software and is provided to you under the terms of the GNU General Public License version 2
5  * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
6  *
7  * A copy of the licence is included with the program, and can also be obtained from Free Software
8  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
9  */
10
11 #ifndef __MALI_KERNEL_MEM_OS_H__
12 #define __MALI_KERNEL_MEM_OS_H__
13
14 /**
15  * @brief Creates an object that manages allocating OS memory
16  *
17  * Creates an object that provides an interface to allocate OS memory and
18  * have it mapped into the Mali virtual memory space.
19  *
20  * The object exposes pointers to
21  * - allocate OS memory
22  * - allocate Mali page tables in OS memory
23  * - destroy the object
24  *
25  * Allocations from OS memory are of type mali_physical_memory_allocation
26  * which provides a function to release the allocation.
27  *
28  * @param max_allocation max. number of bytes that can be allocated from OS memory
29  * @param cpu_usage_adjust value to add to mali physical addresses to obtain CPU physical addresses
30  * @param name description of the allocator
31  * @return pointer to mali_physical_memory_allocator object. NULL on failure.
32  **/
33 mali_physical_memory_allocator * mali_os_allocator_create(u32 max_allocation, u32 cpu_usage_adjust, const char *name);
34
35 #endif /* __MALI_KERNEL_MEM_OS_H__ */
36
37