mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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:
parent
5443bf7a26
commit
6f6f5d258b
2 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue