msm: kgsl: Use the gpuaddr to decide whether to map memstore
Use the gpuaddr to determine whether memstore is being mapped in
mmap or a normal memory allocation is mapped instead of physical
address. gpuaddr of the memstore will always be unique but the
physaddr may be equal to the gpuaddr of another memory allocation
and that will cause the memory allocation to be mapped as memstore
which is wrong.
Change-Id: I6a803e82e0a9d3713ebb3f15ea46d450f69d8ac7
CRs-fixed: 379019
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index e1755de..3047693 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -1181,7 +1181,7 @@
/*NOTE: with mmu enabled, gpuaddr doesn't mean
* anything to mmap().
*/
- shadowprop.gpuaddr = device->memstore.physaddr;
+ shadowprop.gpuaddr = device->memstore.gpuaddr;
shadowprop.size = device->memstore.size;
/* GSL needs this to be set, even if it
appears to be meaningless */