msm: kgsl: Reorganize the shared memory APIs
Despite being designed to be flexible, the current GPU shared memory API
ended up being a jumble of forks and conditionals. Redesign the API to
have three outward facing functions:
kgsl_allocate_user
kgsl_allocate_kernel
kgsl_allocate_global
The three APIs are built on each other:
kgsl_allocate_user() allocates three kinds of memory depending on the
system characteristics.
kgsl_allocate_kernel() allocates the same memory and maps it automatically
in the kernel space.
kgsl_allocate_global() allocates kernel memory and then adds it to the
global buffer list.
Internally the individual memory allocation functions use memdesc ops to
have unique map and free functions. This will make it easier to later omit
a specific type of memory without having to deal with a lot of #ifdefs and
code changes.
Change-Id: Ic0dedbad6c99a45d2e441097563f67f7e1e983cb
Signed-off-by:
Jordan Crouse <jcrouse@codeaurora.org>
Loading
Please register or sign in to comment