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

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

msm: kgsl: Don't allocate GMU dump memory if not used



Older targets used this scratch memory for debug purposes.
Newer targets don't use this memory so don't allocate it.

Change-Id: I4bfae0fc10eedb289c6765a15d95045f46ffb96e
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 452becbf
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -555,6 +555,8 @@ static void gmu_memory_close(struct gmu_device *gmu)
 */
static int gmu_memory_probe(struct gmu_device *gmu, struct device_node *node)
{
	struct kgsl_device *device = container_of(gmu, struct kgsl_device, gmu);
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	int ret;

	ret = gmu_iommu_init(gmu, node);
@@ -582,12 +584,14 @@ static int gmu_memory_probe(struct gmu_device *gmu, struct device_node *node)
	}

	/* Allocates & maps GMU crash dump memory */
	if (adreno_is_a630(adreno_dev)) {
		gmu->dump_mem = allocate_gmu_kmem(gmu, GMU_NONCACHED_KERNEL,
				DUMPMEM_SIZE, (IOMMU_READ | IOMMU_WRITE));
		if (IS_ERR(gmu->dump_mem)) {
			ret = PTR_ERR(gmu->dump_mem);
			goto err_ret;
		}
	}

	/* GMU master log */
	gmu->gmu_log = allocate_gmu_kmem(gmu, GMU_NONCACHED_KERNEL, LOGMEM_SIZE,