Lines Matching defs:tegra
234 static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo)
247 mutex_lock(&tegra->mm_lock);
249 err = drm_mm_insert_node_generic(&tegra->mm,
252 dev_err(tegra->drm->dev, "out of I/O virtual memory: %d\n",
259 size = iommu_map_sgtable(tegra->domain, bo->iova, bo->sgt, prot);
261 dev_err(tegra->drm->dev, "failed to map buffer\n");
268 mutex_unlock(&tegra->mm_lock);
275 mutex_unlock(&tegra->mm_lock);
280 static int tegra_bo_iommu_unmap(struct tegra_drm *tegra, struct tegra_bo *bo)
285 mutex_lock(&tegra->mm_lock);
286 iommu_unmap(tegra->domain, bo->iova, bo->size);
288 mutex_unlock(&tegra->mm_lock);
377 struct tegra_drm *tegra = drm->dev_private;
380 if (tegra->domain) {
385 err = tegra_bo_iommu_map(tegra, bo);
461 struct tegra_drm *tegra = drm->dev_private;
474 if (tegra->domain) {
487 err = tegra_bo_iommu_map(tegra, bo);
513 struct tegra_drm *tegra = gem->dev->dev_private;
518 if (tegra->domain) {
519 tegra_bo_iommu_unmap(tegra, bo);
540 struct tegra_drm *tegra = drm->dev_private;
544 ret = drm_mode_size_dumb(drm, args, tegra->pitch_align, 0);