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

Commit 17dd1721 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Use alignment corresponding to max supported page size" into msm-4.14

parents 88852130 1cb4185e
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -716,6 +716,18 @@ kgsl_sharedmem_page_alloc_user(struct kgsl_memdesc *memdesc,

	align = (memdesc->flags & KGSL_MEMALIGN_MASK) >> KGSL_MEMALIGN_SHIFT;

	/*
	 * As 1MB is the max supported page size, use the alignment
	 * corresponding to 1MB page to make sure higher order pages
	 * are used if possible for a given memory size. Also, we
	 * don't need to update alignment in memdesc flags in case
	 * higher order page is used, as memdesc flags represent the
	 * virtual alignment specified by the user which is anyways
	 * getting satisfied.
	 */
	if (align < ilog2(SZ_1M))
		align = ilog2(SZ_1M);

	page_size = kgsl_get_page_size(size, align);

	/*