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

Commit a783fe9d authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Allocate buffer for GMU master log



The GMU master log is allocated in uncacheable memory.
The base address of the log is communicated to the GMU
via a scratch register. This log is available for recording
events right from the start of GMU initialization.

Change-Id: I7be1ef5259101ca3fc01c042cd328ffb8d7cea39
Signed-off-by: default avatarSushmita Susheelendra <ssusheel@codeaurora.org>
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 45a56efa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2088,6 +2088,7 @@ static int a6xx_gmu_fw_start(struct kgsl_device *device,
			| (ADRENO_CHIPID_PATCH(adreno_dev->chipid) << 8);

	kgsl_gmu_regwrite(device, A6XX_GMU_HFI_SFR_ADDR, chipid);
	kgsl_gmu_regwrite(device, A6XX_GMU_GENERAL_6, gmu->gmu_log->gmuaddr);

	/* Configure power control and bring the GMU out of reset */
	a6xx_gmu_power_config(device);
+10 −0
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@ struct gmu_iommu_context {

#define DUMPMEM_SIZE SZ_16K

#define LOGMEM_SIZE SZ_4K

/* Define target specific GMU VMA configurations */
static const struct gmu_vma vma = {
	/* Noncached user segment */
@@ -440,6 +442,14 @@ static int gmu_memory_probe(struct gmu_device *gmu, struct device_node *node)
		goto err_ret;
	}

	/* Allocates & maps memory for GMU log */
	gmu->gmu_log = allocate_gmu_kmem(gmu, LOGMEM_SIZE,
				(IOMMU_READ | IOMMU_WRITE | IOMMU_PRIV));
	if (IS_ERR(gmu->gmu_log)) {
		ret = PTR_ERR(gmu->gmu_log);
		goto err_ret;
	}

	return 0;
err_ret:
	gmu_memory_close(gmu);
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ struct gmu_device {
	struct gmu_memdesc *hfi_mem;
	struct gmu_memdesc *bw_mem;
	struct gmu_memdesc *dump_mem;
	struct gmu_memdesc *gmu_log;
	struct kgsl_hfi hfi;
	unsigned int lm_config;
	unsigned int lm_dcvs_level;