Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2310a0c authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Log if SMMU is stalled without a pagefault



Also make sure we don't run the dispatcher endlessly if we
couldn't do recovery.

Change-Id: I76c661f764bc20eca601b39257b2d72a9aea5f6b
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent b5702b95
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -2120,8 +2120,11 @@ static int dispatcher_do_fault(struct adreno_device *adreno_dev)
		mutex_lock(&device->mutex);
		adreno_readreg(adreno_dev, ADRENO_REG_RBBM_STATUS3, &val);
		mutex_unlock(&device->mutex);
		if (val & BIT(24))
			return 0;
		if (val & BIT(24)) {
			dev_err(device->dev,
				"SMMU is stalled without a pagefault\n");
			return -EBUSY;
		}
	}

	/* Turn off all the timers */
@@ -2386,6 +2389,12 @@ static void _adreno_dispatch_check_timeout(struct adreno_device *adreno_dev,
		drawobj->context->id, drawobj->timestamp);

	adreno_set_gpu_fault(adreno_dev, ADRENO_TIMEOUT_FAULT);

	/*
	 * This makes sure dispatcher doesn't run endlessly in cases where
	 * we couldn't run recovery
	 */
	drawqueue->expires = jiffies + msecs_to_jiffies(adreno_drawobj_timeout);
}

static int adreno_dispatch_process_drawqueue(struct adreno_device *adreno_dev,