Lines Matching refs:tegra

114 static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo)  in tegra_bo_iommu_map()  argument
126 mutex_lock(&tegra->mm_lock); in tegra_bo_iommu_map()
128 err = drm_mm_insert_node_generic(&tegra->mm, in tegra_bo_iommu_map()
131 dev_err(tegra->drm->dev, "out of I/O virtual memory: %d\n", in tegra_bo_iommu_map()
138 bo->size = iommu_map_sg(tegra->domain, bo->paddr, bo->sgt->sgl, in tegra_bo_iommu_map()
141 dev_err(tegra->drm->dev, "failed to map buffer\n"); in tegra_bo_iommu_map()
146 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_map()
153 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_map()
158 static int tegra_bo_iommu_unmap(struct tegra_drm *tegra, struct tegra_bo *bo) in tegra_bo_iommu_unmap() argument
163 mutex_lock(&tegra->mm_lock); in tegra_bo_iommu_unmap()
164 iommu_unmap(tegra->domain, bo->paddr, bo->size); in tegra_bo_iommu_unmap()
166 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_unmap()
251 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_alloc() local
254 if (tegra->domain) { in tegra_bo_alloc()
259 err = tegra_bo_iommu_map(tegra, bo); in tegra_bo_alloc()
335 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_import() local
358 if (tegra->domain) { in tegra_bo_import()
359 err = tegra_bo_iommu_map(tegra, bo); in tegra_bo_import()
389 struct tegra_drm *tegra = gem->dev->dev_private; in tegra_bo_free_object() local
392 if (tegra->domain) in tegra_bo_free_object()
393 tegra_bo_iommu_unmap(tegra, bo); in tegra_bo_free_object()
411 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_dumb_create() local
414 args->pitch = round_up(min_pitch, tegra->pitch_align); in tegra_bo_dumb_create()