msm: ocmem: Correctly program the GPU MPU address
The ocmem mpu start/end address is not programed correctly for GPU. causing
invalid data access in the last 4K of GPU memory.
CRs-Fixed: 419090
Change-Id: I2b9df7000330786f6fcb23aad4ad521f54aac207
Signed-off-by: Alex Wong <waiw@codeaurora.org>
diff --git a/arch/arm/mach-msm/ocmem_core.c b/arch/arm/mach-msm/ocmem_core.c
index 3d9639f..9782b90 100644
--- a/arch/arm/mach-msm/ocmem_core.c
+++ b/arch/arm/mach-msm/ocmem_core.c
@@ -488,7 +488,7 @@
if (mpu_start < 0)
/* Avoid underflow */
mpu_start = 0;
- mpu_end = ((offset+len) >> GFX_MPU_SHIFT) - 1;
+ mpu_end = ((offset+len) >> GFX_MPU_SHIFT);
BUG_ON(mpu_end < 0);
pr_debug("ocmem: mpu: start %x end %x\n", mpu_start, mpu_end);