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

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

Merge "msm: kgsl: Sync non io-coherent dma buffers on attach to GPU"

parents 905177b1 312e4b6f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2655,6 +2655,12 @@ static int kgsl_setup_dma_buf(struct kgsl_device *device,
		return -ENOMEM;

	attach = dma_buf_attach(dmabuf, device->dev);
	/*
	 * If dma buffer is marked IO coherent, skip sync at attach,
	 * which involves flushing the buffer on CPU.
	 * HW manages coherency for IO coherent buffers.
	 */
	if (entry->memdesc.flags & KGSL_MEMFLAGS_IOCOHERENT)
		attach->dma_map_attrs |= DMA_ATTR_SKIP_CPU_SYNC;

	if (IS_ERR_OR_NULL(attach)) {