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

Commit 71f4dcac authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Move memstore allocation to adreno



Move the memstore allocation to adreno to prepare for adding a GPU
feature to enable universal APRIV for the CP.

Change-Id: Ic0dedbade816ae71e0e1a760c141c250cf2cf42f
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent c821c686
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1405,6 +1405,12 @@ static int adreno_probe(struct platform_device *pdev)
	if (ADRENO_FEATURE(adreno_dev, ADRENO_IOCOHERENT))
		device->mmu.features |= KGSL_MMU_IO_COHERENT;

	/* Allocate the memstore for storing timestamps and other useful info */
	status = kgsl_allocate_global(device, &device->memstore,
		KGSL_MEMSTORE_SIZE, 0, KGSL_MEMDESC_CONTIG, "memstore");
	if (status)
		goto out;

	status = adreno_ringbuffer_probe(adreno_dev);
	if (status)
		goto out;
@@ -1456,6 +1462,7 @@ static int adreno_probe(struct platform_device *pdev)
out:
	if (status) {
		adreno_ringbuffer_close(adreno_dev);
		kgsl_free_global(device, &device->memstore);
		kgsl_device_platform_remove(device);
		device->pdev = NULL;
	}
@@ -1536,6 +1543,8 @@ static int adreno_remove(struct platform_device *pdev)
	if (efuse_base != NULL)
		iounmap(efuse_base);

	kgsl_free_global(device, &device->memstore);

	kgsl_device_platform_remove(device);

	gmu_core_remove(device);
+0 −8
Original line number Diff line number Diff line
@@ -5084,12 +5084,6 @@ int kgsl_device_platform_probe(struct kgsl_device *device)
	/* Initialize the memory pools */
	kgsl_init_page_pools(device->pdev);

	status = kgsl_allocate_global(device, &device->memstore,
		KGSL_MEMSTORE_SIZE, 0, KGSL_MEMDESC_CONTIG, "memstore");

	if (status != 0)
		goto error_close_mmu;

	/*
	 * The default request type PM_QOS_REQ_ALL_CORES is
	 * applicable to all CPU cores that are online and
@@ -5162,8 +5156,6 @@ void kgsl_device_platform_remove(struct kgsl_device *device)

	idr_destroy(&device->context_idr);

	kgsl_free_global(device, &device->memstore);

	kgsl_mmu_close(device);

	kgsl_pwrctrl_close(device);