Commit Graph

23 Commits

Author SHA1 Message Date
Olav Haugan
0703dbf608 gpu: ion: Refactor platform data
Refactor platform data to allow for better
expansion in the future. Add void * for
elements unique to each heap type.

Change-Id: I435679819c67ce917b5798009eff7e71047fd2ea
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-15 09:30:35 -08:00
Olav Haugan
0a85251cd8 gpu: ion: Add support for secure buffers
Secure buffers provides a way to allow premium encrypted
multimedia content to be decrypted in a secured
memory area that does not allow for interception of the
decrypted content.

Add support for heap type that allow heap to be
used for content protection. Introduce new content
protection heap type and id's.

Change-Id: Idd56aa8805b5b74d1b9ab3fe8964aacc218668c1
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-14 22:18:45 -07:00
Olav Haugan
b5be7998c6 gpu: ion: Add heap ids
Add heap ids for ion heaps. Remove unused
system contiguous heap. Fix vmalloc heap name.

Change-Id: I3c3a653a53c8db8b66a7bba2abac0dfe560c407c
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-06 14:49:08 -08:00
Olav Haugan
ee0f780d78 board: 8660: Add callbacks to request_region
Callbacks to request_region, release_region,
setup_region is missing from ION platform data for
SMI heap.

Change-Id: Ida603d4ac7c3246c0deedb9b80dc0c1ea64638eb
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2011-12-21 16:32:08 -08:00
Laura Abbott
8c0173668e gpu: ion: Add support for iommus
Add infrastructure to support mapping allocations
into iommus.

Change-Id: Ia5eafebee408e297013bf55284abf67d9eb8d78b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-05 10:36:11 -08:00
Alex Bird
8a3ede3801 gpu: ion: Add callbacks to enable SMI voting in ION.
This change is part of the move from PMEM to ION. ION needs an SMI
voting interface smiliar to PMEM's.

Change-Id: I18888f46198848694fb7e1e0d2671074bf51d7c9
Signed-off-by: Alex Bird <alexbird@codeaurora.org>
2011-12-01 17:45:22 -08:00
Laura Abbott
e80ea017f1 gpu: ion: Add support for flushing via fd
Userspace clients pass fds around, not handles. Support flushing
via fd.

Change-Id: Ic22d9327e9fa72cb604c3010a2a6f798be8dfdb1
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-11-21 12:27:52 -08:00
Alex Bird
27ca661bda msm: Add SMI callbacks to ION platform data.
As part of the transition from PMEM to ION, the interface for accessing
SMI memory needs to be accessible from ION as it was from PMEM.

Change-Id: Ia6f9475dc030bbb0dafdcc1b6dbe93c7cdeca268
Signed-off-by: Alex Bird <alexbird@codeaurora.org>
2011-11-10 10:43:24 -08:00
Laura Abbott
63cfd7e6a2 8660: Add support for Ion
Add support for Ion

Change-Id: I1c04b8a6df005c6ced8681f419f4445592b4832d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-11-01 16:30:51 -07:00
Laura Abbott
6557696b65 gpu: ion: Add header file for ERR_PTR
Add err.h for the declaration of ERR_PTR which
is used with the stubbed out ion headers.

Change-Id: Ic5e5aea556723ea6b9c8953ef54ad5a82d3761ec
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-31 22:40:09 -07:00
Laura Abbott
2d1760b4f1 board-msm8960: Add ion heaps corresponding to pmem heaps
Add adsp heaps for ion. This corresponds directly
to what pmem currently does. This also includes disabling
the adsp and pmem heaps for pmem.

Change-Id: I4354c713413ebbe949579741efdd75e9c444c8e7
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-30 06:02:16 -06:00
Jordan Crouse
8cd4832d4d gpu: ion: Add inline stubs for Ion functions
Add inline stubs for in-kernel Ion functions to use when
Ion is not enabled in the kernel config.

Change-Id: Ic0dedbadbe4d7bab8f24763e67dd775c769b06df
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-28 15:27:14 -06:00
Laura Abbott
273dd8e94a gpu: ion: Add API to get the buffer flags
Clients may want to know what the existing flags are on a
handle for mapping, cache flushing or other purposes. Add
an API to get those flags.

Change-Id: I2d8c93194d1fc940042529b8851ebecf35d6e3de
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-28 13:18:34 -07:00
Laura Abbott
cffdff5354 Kbuild: Add ion header file
Make sure the header file for Ion gets exported to userspace.
Also make sure userspace can actually use the header.

Change-Id: I44f436005a6a503811c85d4fb0f89264ba160571
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-15 11:56:54 -07:00
Laura Abbott
abcb6f740e gpu: ion: Add cache flushing APIs
Add ioctl to support flushing the caches of ion
buffers from userspace.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-11 09:59:30 -07:00
Laura Abbott
354120303a gpu: ion: Add IS_CACHED macro
Add a proper IS_CACHED macro for detecting whether or not
flags indicated a cached mapping.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-11 09:59:25 -07:00
Laura Abbott
894fd58ea8 gpu: ion: Add support for cached and uncached mappings
Add explicit support for cached and uncached mappings. Functions
now describe whether mappings will be cached or uncached.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-03 16:17:38 -07:00
Laura Abbott
a2e9363f06 gpu: ion: Add support for carveout heaps on msm targets
Add infrastructure for supporting ion carveout heaps.
The memory type should be specified in the board file using
mach/ion.h. The ion platform driver will be responsible for
allocating the correct memory.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-03 16:17:21 -07:00
Laura Abbott
302911d5ba gpu: ion: Add platform driver for msm ion
Add platform driver for msm specific ion devices

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-03 16:17:20 -07:00
Iliyan Malchev
3fe24366a4 ion: minor clean up
-- init rb nodes in ion_handle_create
-- in ion_handle_destroy, check that a node belongs to a tree before removing
   it (safety check, does not happen right now)
-- mark as static functions used only inside ion.c
-- update comments to ion_share() with a relevant blurb from the implementation
-- other minor updates/typo fixes to comments

Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-08-09 14:49:21 -07:00
Iliyan Malchev
f2230156c7 ion: fix ION_HEAP_<xxx>_MASK definitions
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-07-06 19:45:30 -07:00
Rebecca Schultz Zavin
e6ee124528 gpu: ion: Several fixes
Fix some cases where locks were not released on error paths
Change heap->prio to heap->id to make meaning clearer
Fix kernel doc to match sources
2011-06-30 15:15:14 -07:00
Rebecca Schultz Zavin
c80005ae9e gpu: ion: Add ION Memory Manager
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-06-29 19:44:29 -07:00