CHROMIUM: MALI: Fix 32-bit kernels to work

The userspace/kernel ABI for mali_kbase requires being able to pass
64-bit offsets to mmap.  See mali_kbase_mem.h, which says:

 * On a 32bit platform, custom VA should be wired from 4GB
 * to the VA limit of the GPU. Unfortunately, the Linux mmap() interface
 * limits us to 2^32 pages (2^44 bytes, see mmap64 man page for reference).
 * So we put the default limit to the maximum possible on Linux and shrink
 * it down, if required by the GPU, during initialization.

Unfortunately for mali_kbase in commit be83bbf80682 ("mmap: introduce
sane default mmap limits") Linus broke this.  ...but a given driver
can make it work again by setting FMODE_UNSIGNED_OFFSET.  Let's do that.

BUG=chromium:941638
TEST=With series can use the GPU

Change-Id: I5a4f9aeb53808d20f2ec8ed093706ed353e837d8
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1538898
Reviewed-by: John Reitan <john.reitan@arm.corp-partner.google.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
1 file changed