Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e6a0ad6b authored by Jordan Crouse's avatar Jordan Crouse
Browse files

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: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent b0ee18e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment