3 * Copyright 2012 Samsung Electronics S.LSI Co. LTD
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 * @file Exynos_OSAL_SharedMemory.h
21 * @author SeungBeom Kim (sbcrux.kim@samsung.com)
22 * Taehwan Kim (t_h.kim@samsung.com)
28 #ifndef EXYNOS_OSAL_SHAREDMEMORY
29 #define EXYNOS_OSAL_SHAREDMEMORY
31 #include "OMX_Types.h"
33 typedef enum _MEMORY_TYPE
36 CACHED_MEMORY
= 0x01, /* cached */
37 CONTIG_MEMORY
= 0x02, /* continuos */
38 SECURE_MEMORY
= 0x04, /* secure */
39 EXT_MEMORY
= 0x08, /* ext area */
46 OMX_HANDLETYPE
Exynos_OSAL_SharedMemory_Open();
47 void Exynos_OSAL_SharedMemory_Close(OMX_HANDLETYPE handle
);
48 OMX_PTR
Exynos_OSAL_SharedMemory_Alloc(OMX_HANDLETYPE handle
, OMX_U32 size
, MEMORY_TYPE memoryType
);
49 void Exynos_OSAL_SharedMemory_Free(OMX_HANDLETYPE handle
, OMX_PTR pBuffer
);
50 int Exynos_OSAL_SharedMemory_VirtToION(OMX_HANDLETYPE handle
, OMX_PTR pBuffer
);
51 OMX_PTR
Exynos_OSAL_SharedMemory_IONToVirt(OMX_HANDLETYPE handle
, int ion_addr
);
54 OMX_PTR
Exynos_OSAL_SharedMemory_Map(OMX_HANDLETYPE handle
, OMX_U32 size
, unsigned int ionfd
);
55 void Exynos_OSAL_SharedMemory_Unmap(OMX_HANDLETYPE handle
, unsigned int ionfd
);