Lines Matching refs:tegra

180 static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo)  in tegra_bo_iommu_map()  argument
192 mutex_lock(&tegra->mm_lock); in tegra_bo_iommu_map()
194 err = drm_mm_insert_node_generic(&tegra->mm, in tegra_bo_iommu_map()
197 dev_err(tegra->drm->dev, "out of I/O virtual memory: %d\n", in tegra_bo_iommu_map()
204 bo->size = iommu_map_sgtable(tegra->domain, bo->iova, bo->sgt, prot); in tegra_bo_iommu_map()
206 dev_err(tegra->drm->dev, "failed to map buffer\n"); in tegra_bo_iommu_map()
211 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_map()
218 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_map()
223 static int tegra_bo_iommu_unmap(struct tegra_drm *tegra, struct tegra_bo *bo) in tegra_bo_iommu_unmap() argument
228 mutex_lock(&tegra->mm_lock); in tegra_bo_iommu_unmap()
229 iommu_unmap(tegra->domain, bo->iova, bo->size); in tegra_bo_iommu_unmap()
231 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_unmap()
320 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_alloc() local
323 if (tegra->domain) { in tegra_bo_alloc()
328 err = tegra_bo_iommu_map(tegra, bo); in tegra_bo_alloc()
404 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_import() local
427 if (tegra->domain) { in tegra_bo_import()
428 err = tegra_bo_iommu_map(tegra, bo); in tegra_bo_import()
451 struct tegra_drm *tegra = gem->dev->dev_private; in tegra_bo_free_object() local
454 if (tegra->domain) in tegra_bo_free_object()
455 tegra_bo_iommu_unmap(tegra, bo); in tegra_bo_free_object()
473 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_dumb_create() local
476 args->pitch = round_up(min_pitch, tegra->pitch_align); in tegra_bo_dumb_create()