]> git.karo-electronics.de Git - linux-beck.git/commit
gpu: ion: Add support for cached mappings that don't fault
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 13 Dec 2013 22:24:05 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:39 +0000 (08:55 -0800)
commit856661d514e8afc452bcda6f4c05a957694fea78
treeb18b744b44b43dc01f679a84f4698f59601c53e6
parentd3c0bced267a6726a2abc44c3457495bd7b427ca
gpu: ion: Add support for cached mappings that don't fault

We have found that faulting in the mappings for cached
allocations has a significant performance impact and is
only a benefit if only a small part of the buffer is
touched by the cpu (an uncommon case for software rendering).
This patch introduces a ION_FLAG_CACHED_NEEDS_SYNC
which determines whether a mapping should be created by
faulting or at mmap time.  If this flag is set,
userspace must manage the caches explictly using the SYNC ioctl.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion.h