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

Skip to content
Commit 0f09e6d0 authored by Sharat Masetty's avatar Sharat Masetty
Browse files

msm: kgsl: Call dma_buf_unmap_attachment() early



When we import an ION buffer, we call the dma_buf_map_attachment().
The intent is to not map it to the dma device(which in this case is the
KGSl device), but to only get the sg_table. Once we have the sg_table
we later map the physical pages to the GPU SMMU manually and not by using
the dma device ops.

The ION driver as part of the partial cache maintenance requires that
all the sg_tables of the attached devices to the buffer have a single
segment. This creates a problem for KGSL since in this case the kgsl is
a dummy device, so the buffer for KGSL always has multiple segments.

This patch calls the dma_buf_unmap_attachment() as soon we get a hold of
the sg_table as doing so a) we don't need the buffer to be mapped to a
dummy device, b) removes the buffer from the cache maintenance constraints
of the ION driver.

Change-Id: I0675e62c4a27b4e368d53ea6310c9244b687baa6
Signed-off-by: default avatarSharat Masetty <smasetty@codeaurora.org>
parent 378fc3b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment