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

Commit e3987f28 authored by Vladimir Razgulin's avatar Vladimir Razgulin
Browse files

msm: kgsl: Use correct offsets for VBIF counters on A4xx



VBIF counter offsets are different on A3xx and A4xx. Use the correct
offset value to access "waiting for ram" power performance counter
on both platforms.

Change-Id: I82b8ce2378742726e20186ece82ff42ff4201ce7
Signed-off-by: default avatarVladimir Razgulin <vrazguli@codeaurora.org>
parent 08a9c39e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2008-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -188,6 +188,7 @@ struct adreno_device {
	struct work_struct input_work;
	struct adreno_busy_data busy_data;
	unsigned int ram_cycles_lo;
	unsigned int starved_ram_lo;
};

/**
+4 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1508,7 +1508,7 @@ void a3xx_busy_cycles(struct adreno_device *adreno_dev,
					adreno_dev->ram_cycles_lo,
					&busy->vbif_ram_cycles);
		data->vbif_starved_ram = counter_delta(adreno_dev,
					A3XX_VBIF_PERF_PWR_CNT0_LO,
					adreno_dev->starved_ram_lo,
					&busy->vbif_starved_ram);
	}
}
@@ -1965,7 +1965,8 @@ int a3xx_perfcounter_init(struct adreno_device *adreno_dev)
		/* VBIF waiting for RAM */
		ret |= adreno_perfcounter_get(adreno_dev,
				KGSL_PERFCOUNTER_GROUP_VBIF_PWR, 0,
				NULL, NULL, PERFCOUNTER_FLAG_KERNEL);
				&adreno_dev->starved_ram_lo, NULL,
				PERFCOUNTER_FLAG_KERNEL);

		/* VBIF DDR cycles */
		ret |= adreno_perfcounter_get(adreno_dev,