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

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

msm: kgsl: Disable rbbm countable on a540



The RBBM_ALWAYS_COUNT countable does not function properly
when top level clock gating is enabled. Return -EINVAL
when user requests this perfcounter.

CRs-Fixed: 1038778
Change-Id: I48d560ab2caa6ea467ac56bf0d323937a475cdde
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 9e2d528d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -788,6 +788,9 @@
/* COUNTABLE FOR TSE PERFCOUNTER */
#define A5XX_TSE_INPUT_PRIM_NUM            0x6

/* COUNTABLE FOR RBBM PERFCOUNTER */
#define A5XX_RBBM_ALWAYS_COUNT		0x0

/* GPMU POWER COUNTERS */
#define A5XX_SP_POWER_COUNTER_0_LO		0xA840
#define A5XX_SP_POWER_COUNTER_0_HI		0xA841
+5 −0
Original line number Diff line number Diff line
@@ -812,6 +812,11 @@ static int adreno_perfcounter_enable(struct adreno_device *adreno_dev,
	case KGSL_PERFCOUNTER_GROUP_ALWAYSON_PWR:
		_power_counter_enable_alwayson(adreno_dev, counters);
		break;
	case KGSL_PERFCOUNTER_GROUP_RBBM:
		/* The following rbbm countable is not reliable on a540 */
		if (adreno_is_a540(adreno_dev))
			if (countable == A5XX_RBBM_ALWAYS_COUNT)
				return -EINVAL;
	default:
		return _perfcounter_enable_default(adreno_dev, counters, group,
				counter, countable);