aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/gem.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-02-07 02:22:23 +0000
committerDave Airlie <[email protected]>2020-02-07 02:22:30 +0000
commite139e8aed0d3a536b67446cb1755a61f52e8d4c9 (patch)
tree610a395470daaa90e0220b20722210bc83791a13 /drivers/gpu/drm/tegra/gem.c
parentMerge branch 'ttm-prot-fix' of git://people.freedesktop.org/~thomash/linux in... (diff)
parentgpu: host1x: Set DMA direction only for DMA-mapped buffer objects (diff)
downloadkernel-e139e8aed0d3a536b67446cb1755a61f52e8d4c9.tar.gz
kernel-e139e8aed0d3a536b67446cb1755a61f52e8d4c9.zip
Merge tag 'drm/tegra/for-5.6-rc1-fixes' of git://anongit.freedesktop.org/tegra/linux into drm-next
drm/tegra: Fixes for v5.6-rc1 These are a couple of quick fixes for regressions that were found during the first two weeks of the merge window. Signed-off-by: Dave Airlie <[email protected]> From: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/tegra/gem.c')
-rw-r--r--drivers/gpu/drm/tegra/gem.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index 1237df157e05..623768100c6a 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -60,8 +60,16 @@ static struct sg_table *tegra_bo_pin(struct device *dev, struct host1x_bo *bo,
/*
* If we've manually mapped the buffer object through the IOMMU, make
* sure to return the IOVA address of our mapping.
+ *
+ * Similarly, for buffers that have been allocated by the DMA API the
+ * physical address can be used for devices that are not attached to
+ * an IOMMU. For these devices, callers must pass a valid pointer via
+ * the @phys argument.
+ *
+ * Imported buffers were also already mapped at import time, so the
+ * existing mapping can be reused.
*/
- if (phys && obj->mm) {
+ if (phys) {
*phys = obj->iova;
return NULL;
}