Lines Matching +full:sg +full:- +full:micro
2 * Copyright 2012 Advanced Micro Devices, Inc.
27 #include <linux/dma-buf.h>
41 return drm_prime_pages_to_sg(obj->dev, bo->tbo.ttm->pages, in radeon_gem_prime_get_sg_table()
42 bo->tbo.ttm->num_pages); in radeon_gem_prime_get_sg_table()
47 struct sg_table *sg) in radeon_gem_prime_import_sg_table() argument
49 struct dma_resv *resv = attach->dmabuf->resv; in radeon_gem_prime_import_sg_table()
50 struct radeon_device *rdev = dev->dev_private; in radeon_gem_prime_import_sg_table()
55 ret = radeon_bo_create(rdev, attach->dmabuf->size, PAGE_SIZE, false, in radeon_gem_prime_import_sg_table()
56 RADEON_GEM_DOMAIN_GTT, 0, sg, resv, &bo); in radeon_gem_prime_import_sg_table()
61 bo->tbo.base.funcs = &radeon_gem_object_funcs; in radeon_gem_prime_import_sg_table()
63 mutex_lock(&rdev->gem.mutex); in radeon_gem_prime_import_sg_table()
64 list_add_tail(&bo->list, &rdev->gem.objects); in radeon_gem_prime_import_sg_table()
65 mutex_unlock(&rdev->gem.mutex); in radeon_gem_prime_import_sg_table()
67 bo->prime_shared_count = 1; in radeon_gem_prime_import_sg_table()
68 return &bo->tbo.base; in radeon_gem_prime_import_sg_table()
79 bo->prime_shared_count++; in radeon_gem_prime_pin()
89 if (bo->prime_shared_count) in radeon_gem_prime_unpin()
90 bo->prime_shared_count--; in radeon_gem_prime_unpin()
98 if (radeon_ttm_tt_has_userptr(bo->rdev, bo->tbo.ttm)) in radeon_gem_prime_export()
99 return ERR_PTR(-EPERM); in radeon_gem_prime_export()