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

Commit 09dd55fa authored by Harshdeep Dhatt's avatar Harshdeep Dhatt Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Profile scm call on a640v1



Log an error message if scm call takes more
than 2 seconds on a640v1. This helps to root
cause fence timeouts seen on a640v1.

Change-Id: If51c3c8c878f97a5b686be1f0c15bb5c6284dffe
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent ce9c09a2
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -1824,16 +1824,24 @@ static int _adreno_start(struct adreno_device *adreno_dev)
	if (regulator_left_on)
		_soft_reset(adreno_dev);

	if ((adreno_is_a640v1(adreno_dev)) &&
		scm_is_call_available(SCM_SVC_MP, CP_SMMU_APERTURE_ID)) {

	if (adreno_is_a640v1(adreno_dev)) {
		unsigned long start = jiffies;

		if (scm_is_call_available(SCM_SVC_MP, CP_SMMU_APERTURE_ID)) {
			ret = kgsl_program_smmu_aperture();
			/* Log it if it takes more than 2 seconds */
			if (((jiffies - start) / HZ) > 2)
				dev_err(device->dev, "scm call took too long to finish on a640v1: %lu seconds\n",
					((jiffies - start) / HZ));
			if (ret) {
			dev_err(device->dev,
				"SMMU aperture programming call failed with error %d\n",
				dev_err(device->dev, "SMMU aperture programming call failed with error %d\n",
					ret);
				goto error_pwr_off;
			}
		}
	}

	adreno_ringbuffer_set_global(adreno_dev, 0);

	status = kgsl_mmu_start(device);