OSDN Git Service

msm: kgsl: Do not free gpuaddr range if unmap fails
authorHarshdeep Dhatt <hdhatt@codeaurora.org>
Fri, 16 Sep 2016 17:02:37 +0000 (11:02 -0600)
committerHarshdeep Dhatt <hdhatt@codeaurora.org>
Thu, 29 Sep 2016 20:40:50 +0000 (14:40 -0600)
commit3f25aa2b782aef42da07fd54a89b9c3e729cc6bf
treec0c1a7028f8b60f68aa6b30a62ad2fe4364bb670
parent626caf4e54864d90e8d104277f9a1446e487c7e1
msm: kgsl: Do not free gpuaddr range if unmap fails

Currently, we free up the gpuaddr range whether unmap
succeeds or fails. If it fails and we free up the gpuaddr
range, there is a possibility that a later allocation will
overlap with this range. Mapping this new range leads to a
BUG_ON() in the iommu driver which thinks that we are
overwriting an existing mapping. To avoid this, we never
free the failing gpuaddr range, effectively removing it
from being re-used for any future mappings.

CRs-Fixed: 1072834
Change-Id: I57dfd6abe6c928dbe4df1bcc682d4093040ccb9f
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
drivers/gpu/msm/kgsl.c
drivers/gpu/msm/kgsl_mmu.c
drivers/gpu/msm/kgsl_sharedmem.c