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

Commit bb54906c authored by Shubhraprakash Das's avatar Shubhraprakash Das
Browse files

msm: kgsl: Add performance counter init function for A4XX



Add performance counter initialization for A4XX called during
the device initialization phase.

CRs-fixed: 553313
Change-Id: Ib0a8ef49d4f643b1028e58ce56f3b0cf74865a7b
Signed-off-by: default avatarShubhraprakash Das <sadas@codeaurora.org>
parent 58ea104d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4223,7 +4223,7 @@ static struct adreno_perfcounters a3xx_perfcounters = {
 * a3xx_perfcounter_init
 * @adreno_dev: The device for which counters were initialized
 */
static void a3xx_perfcounter_close(struct adreno_device *adreno_dev)
void a3xx_perfcounter_close(struct adreno_device *adreno_dev)
{
	adreno_perfcounter_put(adreno_dev, KGSL_PERFCOUNTER_GROUP_SP,
		SP_FS_FULL_ALU_INSTRUCTIONS,
@@ -4239,7 +4239,7 @@ static void a3xx_perfcounter_close(struct adreno_device *adreno_dev)
		PERFCOUNTER_FLAG_KERNEL);
}

static int a3xx_perfcounter_init(struct adreno_device *adreno_dev)
int a3xx_perfcounter_init(struct adreno_device *adreno_dev)
{
	int ret;
	/* SP[3] counter is broken on a330 so disable it if a330 device */
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ unsigned int a3xx_busy_cycles(struct adreno_device *adreno_dev);

int a3xx_rb_init(struct adreno_device *adreno_dev,
			struct adreno_ringbuffer *rb);
int a3xx_perfcounter_init(struct adreno_device *adreno_dev);
void a3xx_perfcounter_close(struct adreno_device *adreno_dev);
int a3xx_perfcounter_enable(struct adreno_device *adreno_dev,
	unsigned int group, unsigned int counter, unsigned int countable);
uint64_t a3xx_perfcounter_read(struct adreno_device *adreno_dev,
+2 −0
Original line number Diff line number Diff line
@@ -1030,6 +1030,8 @@ struct adreno_gpudev adreno_a4xx_gpudev = {
	.perfcounters = &a4xx_perfcounters,
	.irq = &a4xx_irq,

	.perfcounter_init = a3xx_perfcounter_init,
	.perfcounter_close = a3xx_perfcounter_close,
	.rb_init = a3xx_rb_init,
	.irq_control = a3xx_irq_control,
	.irq_handler = a3xx_irq_handler,