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

Commit 17729045 authored by Rajesh Kemisetti's avatar Rajesh Kemisetti Committed by Jordan Crouse
Browse files

msm: kgsl: Check for MMU presence before destroy



Check whether MMU is enabled or not before we really
destroy the pagetable.

Change-Id: Ic5fb794d16ae88573de36e5b9c2f289f5bd92ac1
Signed-off-by: default avatarRajesh Kemisetti <rajeshk@codeaurora.org>
parent a85bd71a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -832,7 +832,8 @@ static void kgsl_destroy_process_private(struct kref *kref)
	idr_destroy(&private->syncsource_idr);

	/* When using global pagetables, do not detach global pagetable */
	if (private->pagetable->name != KGSL_MMU_GLOBAL_PT)
	if (kgsl_mmu_enabled() &&
		 private->pagetable->name != KGSL_MMU_GLOBAL_PT)
		kgsl_mmu_putpagetable(private->pagetable);

	kfree(private);
@@ -983,7 +984,8 @@ static void kgsl_process_private_close(struct kgsl_device_private *dev_priv,
	process_release_sync_sources(private);

	/* When using global pagetables, do not detach global pagetable */
	if (private->pagetable->name != KGSL_MMU_GLOBAL_PT)
	if (kgsl_mmu_enabled() &&
		private->pagetable->name != KGSL_MMU_GLOBAL_PT)
		kgsl_mmu_detach_pagetable(private->pagetable);

	/* Remove the process struct from the master list */