Skip to content
Snippets Groups Projects
Commit 35c5c756 authored by Douglas Anderson's avatar Douglas Anderson Committed by Guenter Roeck
Browse files

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 be83bbf8 ("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: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1538898


Reviewed-by: default avatarJohn Reitan <john.reitan@arm.corp-partner.google.com>
Reviewed-by: default avatarStéphane Marchesin <marcheu@chromium.org>
parent 5c6d27e8
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment