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

Commit 263413a3 authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Hardcode pt_base value instead of using PAGE_OFFSET



The PAGE_OFFSET macro value provided by the kernel differs for
arm64 and is far beyond the range of GPU virtual addresses. Hence,
create a macro for the per process pt_base value which is
applicable to our code.

Change-Id: Ia60c8f4d26067faa26f305e6a5563f0bb7dc4962
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent 2b979b24
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -1391,9 +1391,8 @@ static int kgsl_iommu_init(struct kgsl_mmu *mmu)
	 * we're better off with extra room.
	 * we're better off with extra room.
	 */
	 */
	if (mmu->pt_per_process) {
	if (mmu->pt_per_process) {
		mmu->pt_base = PAGE_OFFSET;
		mmu->pt_base = KGSL_PER_PROCESS_PT_BASE;
		mmu->pt_size = KGSL_IOMMU_GLOBAL_MEM_BASE
		mmu->pt_size = KGSL_PER_PROCESS_PT_SIZE;
				- kgsl_mmu_get_base_addr(mmu) - SZ_1M;
		mmu->use_cpu_map = true;
		mmu->use_cpu_map = true;
	} else {
	} else {
		mmu->pt_base = KGSL_PAGETABLE_BASE;
		mmu->pt_base = KGSL_PAGETABLE_BASE;
+3 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,9 @@


/* Pagetable virtual base */
/* Pagetable virtual base */
#define KGSL_PAGETABLE_BASE     0x10000000
#define KGSL_PAGETABLE_BASE     0x10000000
#define KGSL_PER_PROCESS_PT_BASE	0xC0000000
#define KGSL_PER_PROCESS_PT_SIZE	(KGSL_IOMMU_GLOBAL_MEM_BASE -	\
					 KGSL_PER_PROCESS_PT_BASE - SZ_1M)


#define KGSL_IOMMU_CTX_OFFSET_V0	0
#define KGSL_IOMMU_CTX_OFFSET_V0	0
#define KGSL_IOMMU_CTX_OFFSET_V1	0x8000
#define KGSL_IOMMU_CTX_OFFSET_V1	0x8000