diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-02-16 15:47:26 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-02-16 15:47:26 +0100 |
commit | 6dee6ae9d62642e81def4d461d71f13a6496ab59 (patch) | |
tree | 6c75d416c427a59f190e197ad83fe59b7bebf656 /drivers/gpu/drm/tegra/gem.c | |
parent | 1beaeacdc88b537703d04d5536235d0bbb36db93 (diff) | |
parent | 0b24a0bbe2147815d982d9335c41bb10c04f40bc (diff) | |
download | talos-op-linux-6dee6ae9d62642e81def4d461d71f13a6496ab59.tar.gz talos-op-linux-6dee6ae9d62642e81def4d461d71f13a6496ab59.zip |
Merge tag 'irqchip-4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip updates for 4.16-rc2 from Marc Zyngier
- A MIPS GIC fix for spurious, masked interrupts
- A fix for a subtle IPI bug in GICv3
- Do not probe GICv3 ITSs that are marked as disabled
- Multi-MSI support for GICv2m
- Various cleanups
Diffstat (limited to 'drivers/gpu/drm/tegra/gem.c')
-rw-r--r-- | drivers/gpu/drm/tegra/gem.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index ab1e53d434e8..49b9bf28f872 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -114,7 +114,7 @@ static const struct host1x_bo_ops tegra_bo_ops = { static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo) { int prot = IOMMU_READ | IOMMU_WRITE; - ssize_t err; + int err; if (bo->mm) return -EBUSY; @@ -128,22 +128,21 @@ static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo) err = drm_mm_insert_node_generic(&tegra->mm, bo->mm, bo->gem.size, PAGE_SIZE, 0, 0); if (err < 0) { - dev_err(tegra->drm->dev, "out of I/O virtual memory: %zd\n", + dev_err(tegra->drm->dev, "out of I/O virtual memory: %d\n", err); goto unlock; } bo->paddr = bo->mm->start; - err = iommu_map_sg(tegra->domain, bo->paddr, bo->sgt->sgl, - bo->sgt->nents, prot); - if (err < 0) { - dev_err(tegra->drm->dev, "failed to map buffer: %zd\n", err); + bo->size = iommu_map_sg(tegra->domain, bo->paddr, bo->sgt->sgl, + bo->sgt->nents, prot); + if (!bo->size) { + dev_err(tegra->drm->dev, "failed to map buffer\n"); + err = -ENOMEM; goto remove; } - bo->size = err; - mutex_unlock(&tegra->mm_lock); return 0; |