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

Commit a5984a22 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dma-mapping-fast: Align memory allocation to dma_alloc_attrs expectations"

parents 97b74a2c 4bb06438
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -643,6 +643,7 @@ static void *__fast_smmu_alloc_contiguous(struct device *dev, size_t size,
		coherent_addr = page_address(page);
	}

	memset(coherent_addr, 0, size);
	*handle = iova;
	return coherent_addr;

@@ -681,6 +682,9 @@ static void *fast_smmu_alloc(struct device *dev, size_t size,
		return NULL;
	}

	if (!(attrs & DMA_ATTR_SKIP_ZEROING))
		gfp |= __GFP_ZERO;

	*handle = DMA_ERROR_CODE;
	size = ALIGN(size, SZ_4K);