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

Commit dcdacafa authored by Lucille Sylvester's avatar Lucille Sylvester
Browse files

msm: kgsl: Don't enable VBIF counters for targets that don't use them



Only targets with separate bus control need the VBIF counters enabled
by default.

Change-Id: I3a7fcedebf7a7cc80bc1bec5a7fd298b49b9b165
Signed-off-by: default avatarLucille Sylvester <lsylvest@codeaurora.org>
parent ca6129fc
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1941,6 +1941,7 @@ void a3xx_perfcounter_close(struct adreno_device *adreno_dev)
int a3xx_perfcounter_init(struct adreno_device *adreno_dev)
{
	int ret;
	struct kgsl_device *device = &adreno_dev->dev;
	/* SP[3] counter is broken on a330 so disable it if a330 device */
	if (adreno_is_a330(adreno_dev))
		a3xx_perfcounters_sp[3].countable = KGSL_PERFCOUNTER_BROKEN;
@@ -1953,16 +1954,19 @@ int a3xx_perfcounter_init(struct adreno_device *adreno_dev)
	ret = adreno_perfcounter_get(adreno_dev, KGSL_PERFCOUNTER_GROUP_PWR, 1,
			NULL, NULL, PERFCOUNTER_FLAG_KERNEL);

	if (device->pwrctrl.bus_control) {
		/* VBIF waiting for RAM */
		ret |= adreno_perfcounter_get(adreno_dev,
				KGSL_PERFCOUNTER_GROUP_VBIF_PWR, 0,
				NULL, NULL, PERFCOUNTER_FLAG_KERNEL);

		/* VBIF DDR cycles */
	ret |= adreno_perfcounter_get(adreno_dev, KGSL_PERFCOUNTER_GROUP_VBIF,
		ret |= adreno_perfcounter_get(adreno_dev,
				KGSL_PERFCOUNTER_GROUP_VBIF,
				VBIF_AXI_TOTAL_BEATS,
				&adreno_dev->ram_cycles_lo, NULL,
				PERFCOUNTER_FLAG_KERNEL);
	}

	/* Default performance counter profiling to false */
	adreno_dev->profile.enabled = false;