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

Commit a2804a83 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Reassign always on register offset when no GMU" into msm-4.9

parents c226284f 6ce0042a
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -224,9 +224,27 @@ static void a6xx_platform_setup(struct adreno_device *adreno_dev)
	adreno_dev->sp_pvt_gpuaddr = addr + SZ_64K;
}

static void _update_always_on_regs(struct adreno_device *adreno_dev)
{
	struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);
	unsigned int *const regs = gpudev->reg_offsets->offsets;

	regs[ADRENO_REG_RBBM_ALWAYSON_COUNTER_LO] =
		A6XX_CP_ALWAYS_ON_COUNTER_LO;
	regs[ADRENO_REG_RBBM_ALWAYSON_COUNTER_HI] =
		A6XX_CP_ALWAYS_ON_COUNTER_HI;
}

static void a6xx_init(struct adreno_device *adreno_dev)
{
	a6xx_crashdump_init(adreno_dev);

	/*
	 * If the GMU is not enabled, rewrite the offset for the always on
	 * counters to point to the CP always on instead of GMU always on
	 */
	if (!kgsl_gmu_isenabled(KGSL_DEVICE(adreno_dev)))
		_update_always_on_regs(adreno_dev);
}

/**