msm: kgsl: On IOMMU fault force a hard reset

On IOMMU fault it's more stable to reset the IOMMU
unit along with GPU.

Change-Id: I569e3e6fd13d75f3c5401ed0c48220de02618fd6
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
This commit is contained in:
Carter Cooper 2013-08-12 12:11:13 -07:00 committed by Iliyan Malchev
parent 5443bf7a26
commit 6f6f5d258b
2 changed files with 10 additions and 10 deletions

View file

@ -1724,13 +1724,17 @@ static int adreno_stop(struct kgsl_device *device)
*/
int adreno_reset(struct kgsl_device *device)
{
int ret = 0;
int ret = -EINVAL;
struct kgsl_mmu *mmu = &device->mmu;
/* Try soft reset first */
if (adreno_soft_reset(device) != 0) {
KGSL_DEV_ERR_ONCE(device, "Device soft reset failed\n");
/* If it failed, then pull the power */
/* Try soft reset first, for non mmu fault case only */
if (!atomic_read(&mmu->fault)) {
ret = adreno_soft_reset(device);
if (ret)
KGSL_DEV_ERR_ONCE(device, "Device soft reset failed\n");
}
if (ret) {
/* If soft reset failed or skipped, then pull the power */
ret = adreno_stop(device);
if (ret)
return ret;

View file

@ -1096,10 +1096,6 @@ replay:
/* Reset the GPU */
mutex_lock(&device->mutex);
/* resume the MMU if it is stalled */
if (pagefault && device->mmu.mmu_ops->mmu_pagefault_resume != NULL)
device->mmu.mmu_ops->mmu_pagefault_resume(&device->mmu);
ret = adreno_reset(device);
mutex_unlock(&device->mutex);
/* if any other fault got in until reset then ignore */