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

Commit 6a2945a9 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Remove MEMDESC_PRIVATE



This used to be useful back in the IOMMUv0 days but those
days are gone.

Change-Id: Ic0dedbade2d59a659238677012d0df5c03a20cd7
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 44ba8f8b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -120,8 +120,6 @@ struct kgsl_memdesc_ops {
#define KGSL_MEMDESC_MAPPED BIT(3)
/* The memdesc is secured for content protection */
#define KGSL_MEMDESC_SECURE BIT(4)
/* The memdesc is private for use during pagetable switch only */
#define KGSL_MEMDESC_PRIVATE BIT(5)
/* Memory is accessible in privileged mode */
#define KGSL_MEMDESC_PRIVILEGED BIT(6)
/* The memdesc is TZ locked content protection */
+8 −33
Original line number Diff line number Diff line
@@ -117,21 +117,8 @@ static void kgsl_unmap_global_pt_entries(struct kgsl_pagetable *pagetable)

	for (i = 0; i < KGSL_MAX_GLOBAL_PT_ENTRIES; i++) {
		struct kgsl_memdesc *entry = kgsl_global_pt_entries.entries[i];
		/* entry was removed */
		if (entry == NULL)
			continue;

		/*
		 * Private entries are only in the private pagetable,
		 * but they are in the global list so that they have a unique
		 * address.
		 */
		if ((entry->priv & KGSL_MEMDESC_PRIVATE) &&
			(pagetable->name != KGSL_MMU_PRIV_PT))
			continue;

		kgsl_mmu_unmap(pagetable,
				kgsl_global_pt_entries.entries[i]);
		if (entry != NULL)
			kgsl_mmu_unmap(pagetable, entry);
	}

	spin_lock_irqsave(&kgsl_driver.ptlock, flags);
@@ -160,23 +147,12 @@ void kgsl_map_global_pt_entries(struct kgsl_pagetable *pagetable)

	for (i = 0; !ret && i < KGSL_MAX_GLOBAL_PT_ENTRIES; i++) {
		struct kgsl_memdesc *entry = kgsl_global_pt_entries.entries[i];
		/* entry was removed */
		if (entry == NULL)
			continue;

		/*
		 * Private entries are only in the private pagetable,
		 * but they are in the global list so that they have a unique
		 * address.
		 */
		if ((entry->priv & KGSL_MEMDESC_PRIVATE) &&
			(pagetable->name != KGSL_MMU_PRIV_PT))
			continue;

		if (entry != NULL) {
			ret = kgsl_mmu_map(pagetable, entry);
		/* If we cannot map the global entries, nothing will work. */
			BUG_ON(ret);
		}
	}

	spin_lock_irqsave(&kgsl_driver.ptlock, flags);
	pagetable->globals_mapped = true;
@@ -205,8 +181,7 @@ void kgsl_remove_global_pt_entry(struct kgsl_memdesc *memdesc)
	for (i = 0; i < kgsl_global_pt_entries.count; i++) {
		if (kgsl_global_pt_entries.entries[i] == memdesc) {
			memdesc->gpuaddr = 0;
			memdesc->priv &= ~(KGSL_MEMDESC_GLOBAL |
						KGSL_MEMDESC_PRIVATE);
			memdesc->priv &= ~KGSL_MEMDESC_GLOBAL;
			for (j = i; j < kgsl_global_pt_entries.count; j++)
				kgsl_global_pt_entries.entries[j] =
				kgsl_global_pt_entries.entries[j + 1];
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
   as an identifier */
#define KGSL_MMU_GLOBAL_PT 0
#define KGSL_MMU_SECURE_PT 1
#define KGSL_MMU_PRIV_PT   0xFFFFFFFF

struct kgsl_device;