]> asedeno.scripts.mit.edu Git - linux.git/commit
gpu: host1x: Acquire a reference to the IOVA cache
authorThierry Reding <treding@nvidia.com>
Mon, 14 May 2018 09:14:00 +0000 (11:14 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 17 May 2018 15:44:48 +0000 (17:44 +0200)
commitf40e1590c5270e5559fb95a5a0a7c1f5266a522d
tree15ca7fa9e087653bb225d3667cecf37b2dac9071
parent24cfdc1ac7d4260aa8416505b9cb6316c9e89021
gpu: host1x: Acquire a reference to the IOVA cache

The IOVA API uses a memory cache to allocate IOVA nodes from. To make
sure that this cache is available, obtain a reference to it and release
the reference when the cache is no longer needed.

On 64-bit ARM this is hidden by the fact that the DMA mapping API gets
that reference and never releases it. On 32-bit ARM, this is papered
over by the Tegra DRM driver (the sole user of the host1x API requiring
the cache) acquiring a reference to the IOVA cache for its own purposes.
However, there may be additional users of this API in the future, so fix
this upfront to avoid surprises.

Fixes: 404bfb78daf3 ("gpu: host1x: Add IOMMU support")
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/dev.c