gpu: ion: Add cache maintenance to ion.
This patch adds cache maintenance operations to ion. As per mailing
list discussions regarding dma_buf, cache operations are done implicitly.
At buffer allocaiton time the user can select whether he'd like mappings
(both kernel and user) to be cached. When cached mappings are selected,
no mappings will be created for a buffer at mmap time. Instead pages will
be faulted in one at a time so we can track which pages require flushing
before dma. When the buffers are mapped for dma (via the dma_buf apis)
any pages which were touched will be synced for device.
Change-Id: Id5d6894e8bb52af038c91dd895143bf3b4203b0b
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Git-commit: e1562c62795ac013c8feaa1a707bd7c039562de9
Git-repo: https://android.googlesource.com/kernel/common
[mitchelh@codeaurora.org: mmap ops in ion: took the Google version
(plus our unmap callback). ion_carveout_heap_map_dma: took the Google
version due to different carveout mechanism. ion_heap_map_kernel: took
the CAF version due to different ioremap
mechanism. ion_system_heap_map_kernel: took the CAF version since it's
still not clear whether mapping system memory as cached is
supported. Resolved a few other merge conflicts due to the fact that
7d72bad55a0e03392d81eee77a9a8c9df6b73a9a already brought in bits and
pieces of this patch (namely the flags/heap_mask split).]
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
3 files changed