OSDN Git Service

gpu: host1x: Allocate gather copy for host1x
authorThierry Reding <treding@nvidia.com>
Mon, 28 Oct 2019 12:37:12 +0000 (13:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:35:29 +0000 (16:35 +0100)
commit9287cc6123d55a019f03eb2d84aab7a2a15ee1f6
tree0f7fed3cee3aa4ed5df6fd7727955b292950814c
parentfe9bd9862144f598930e5f36cfa365140c9bc18e
gpu: host1x: Allocate gather copy for host1x

[ Upstream commit b78e70c04c149299bd210759d7c7af7c86b89ca8 ]

Currently when the gather buffers are copied, they are copied to a
buffer that is allocated for the host1x client that wants to execute the
command streams in the buffers. However, the gather buffers will be read
by the host1x device, which causes SMMU faults if the DMA API is backed
by an IOMMU.

Fix this by allocating the gather buffer copy for the host1x device,
which makes sure that it will be mapped into the host1x's IOVA space if
the DMA API is backed by an IOMMU.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/host1x/job.c