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

Commit 3e5e11b4 authored by Runmin Wang's avatar Runmin Wang
Browse files

soc: qcom: pil: Align to SZ_4K by default



Align to 1MB will cause dma allocation failure if the carvout
pil region is smaller than 1MB. Instead, align the size to 4K
by default.

Change-Id: I6ecf34eb58b837251e50c42238d29389b4edbd1d
Signed-off-by: default avatarRunmin Wang <runminw@codeaurora.org>
parent 8c72aa73
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -451,10 +451,12 @@ static int pil_alloc_region(struct pil_priv *priv, phys_addr_t min_addr,
		return 0;
	}

	if (align > SZ_4M)
	if (align >= SZ_4M)
		aligned_size = ALIGN(size, SZ_4M);
	else
	else if (align >= SZ_1M)
		aligned_size = ALIGN(size, SZ_1M);
	else
		aligned_size = ALIGN(size, SZ_4K);

	priv->desc->attrs = 0;
	priv->desc->attrs |= DMA_ATTR_SKIP_ZEROING | DMA_ATTR_NO_KERNEL_MAPPING;