Lines Matching refs:tegra

225 static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo)  in tegra_bo_iommu_map()  argument
237 mutex_lock(&tegra->mm_lock); in tegra_bo_iommu_map()
239 err = drm_mm_insert_node_generic(&tegra->mm, in tegra_bo_iommu_map()
242 dev_err(tegra->drm->dev, "out of I/O virtual memory: %d\n", in tegra_bo_iommu_map()
249 bo->size = iommu_map_sgtable(tegra->domain, bo->iova, bo->sgt, prot); in tegra_bo_iommu_map()
251 dev_err(tegra->drm->dev, "failed to map buffer\n"); in tegra_bo_iommu_map()
256 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_map()
263 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_map()
268 static int tegra_bo_iommu_unmap(struct tegra_drm *tegra, struct tegra_bo *bo) in tegra_bo_iommu_unmap() argument
273 mutex_lock(&tegra->mm_lock); in tegra_bo_iommu_unmap()
274 iommu_unmap(tegra->domain, bo->iova, bo->size); in tegra_bo_iommu_unmap()
276 mutex_unlock(&tegra->mm_lock); in tegra_bo_iommu_unmap()
365 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_alloc() local
368 if (tegra->domain) { in tegra_bo_alloc()
373 err = tegra_bo_iommu_map(tegra, bo); in tegra_bo_alloc()
449 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_import() local
472 if (tegra->domain) { in tegra_bo_import()
473 err = tegra_bo_iommu_map(tegra, bo); in tegra_bo_import()
496 struct tegra_drm *tegra = gem->dev->dev_private; in tegra_bo_free_object() local
509 if (tegra->domain) in tegra_bo_free_object()
510 tegra_bo_iommu_unmap(tegra, bo); in tegra_bo_free_object()
528 struct tegra_drm *tegra = drm->dev_private; in tegra_bo_dumb_create() local
531 args->pitch = round_up(min_pitch, tegra->pitch_align); in tegra_bo_dumb_create()