| /linux/drivers/gpu/drm/tegra/ |
| H A D | gem.c | 3 * NVIDIA Tegra DRM GEM helper functions 8 * Based on the GEM/CMA helpers 23 #include "gem.h" 56 drm_gem_object_put(&obj->gem); in tegra_bo_put() 63 struct drm_gem_object *gem = &obj->gem; in tegra_bo_pin() local 97 map->size = gem->size; in tegra_bo_pin() 117 err = sg_alloc_table_from_pages(map->sgt, obj->pages, obj->num_pages, 0, gem->size, in tegra_bo_pin() 127 err = dma_get_sgtable(dev, map->sgt, obj->vaddr, obj->iova, gem->size); in tegra_bo_pin() 149 map->size = gem in tegra_bo_pin() 509 tegra_bo_free_object(struct drm_gem_object * gem) tegra_bo_free_object() argument 565 struct drm_gem_object *gem = vma->vm_private_data; tegra_bo_fault() local 585 __tegra_gem_mmap(struct drm_gem_object * gem,struct vm_area_struct * vma) __tegra_gem_mmap() argument 622 struct drm_gem_object *gem; tegra_drm_mmap() local 638 struct drm_gem_object *gem = attach->dmabuf->priv; tegra_gem_prime_map_dma_buf() local 671 struct drm_gem_object *gem = attach->dmabuf->priv; tegra_gem_prime_unmap_dma_buf() local 689 struct drm_gem_object *gem = buf->priv; tegra_gem_prime_begin_cpu_access() local 702 struct drm_gem_object *gem = buf->priv; tegra_gem_prime_end_cpu_access() local 714 struct drm_gem_object *gem = buf->priv; tegra_gem_prime_mmap() local 726 struct drm_gem_object *gem = buf->priv; tegra_gem_prime_vmap() local 741 struct drm_gem_object *gem = buf->priv; tegra_gem_prime_vunmap() local 758 tegra_gem_prime_export(struct drm_gem_object * gem,int flags) tegra_gem_prime_export() argument 779 struct drm_gem_object *gem = buf->priv; tegra_gem_prime_import() local 796 struct drm_gem_object *gem; tegra_gem_lookup() local [all...] |
| H A D | fb.c | 19 #include "gem.h" 123 fb->obj[i] = &planes[i]->gem; in tegra_fb_alloc() 142 struct drm_gem_object *gem; in tegra_fb_create() 152 gem = drm_gem_object_lookup(file, cmd->handles[i]); in tegra_fb_create() 153 if (!gem) { in tegra_fb_create() 163 if (gem->size < size) { in tegra_fb_create() 165 drm_gem_object_put(gem); in tegra_fb_create() 169 planes[i] = to_tegra_bo(gem); in tegra_fb_create() 182 drm_gem_object_put(&planes[i]->gem); in tegra_fb_create() 141 struct drm_gem_object *gem; tegra_fb_create() local
|
| H A D | drm.c | 34 #include "gem.h" 252 refs[num_refs++] = &obj->gem; in tegra_drm_submit() 259 if (offset & 3 || offset > obj->gem.size) { in tegra_drm_submit() 282 refs[num_refs++] = &obj->gem; in tegra_drm_submit() 290 reloc->cmdbuf.offset >= obj->gem.size) { in tegra_drm_submit() 296 refs[num_refs++] = &obj->gem; in tegra_drm_submit() 298 if (reloc->target.offset >= obj->gem.size) { in tegra_drm_submit() 368 struct drm_gem_object *gem; in tegra_gem_mmap() local 371 gem = drm_gem_object_lookup(file, args->handle); in tegra_gem_mmap() 372 if (!gem) in tegra_gem_mmap() 611 struct drm_gem_object *gem; tegra_gem_set_tiling() local 663 struct drm_gem_object *gem; tegra_gem_get_tiling() local 703 struct drm_gem_object *gem; tegra_gem_set_flags() local 728 struct drm_gem_object *gem; tegra_gem_get_flags() local [all...] |
| /linux/include/drm/ |
| H A D | drm_gem.h | 5 * GEM Graphics Execution Manager Driver Interfaces 63 * the puregeable stats until it becomes idle. The status gem object func does 73 * struct drm_gem_object_funcs - GEM object functions 88 * Called upon GEM handle creation. 97 * Called upon GEM handle release. 166 * drm_gem_dmabuf_vmap() helper. Called with a held GEM reservation 177 * drm_gem_dmabuf_vunmap() helper. Called with a held GEM reservation 187 * Handle mmap() of the gem object, setup vma accordingly. 200 * Evicts gem object out from memory. Used by the drm_gem_object_evict() 202 * GEM reservation lock. [all …]
|
| H A D | drm_gem_dma_helper.h | 12 * struct drm_gem_dma_object - GEM object backed by DMA memory allocations 13 * @base: base GEM object 19 * @map_noncoherent: if true, the GEM object is backed by non-coherent memory 26 /* For objects with DMA memory allocated by GEM DMA */ 48 * GEM object functions 52 * drm_gem_dma_object_free - GEM object function for drm_gem_dma_free() 53 * @obj: GEM object to free 69 * @obj: GEM object 83 * drm_gem_dma_object_get_sg_table - GEM object function for drm_gem_dma_get_sg_table() 84 * @obj: GEM object [all …]
|
| H A D | drm_exec.h | 50 * @contended: contended GEM object we backed off for 55 * @prelocked: already locked GEM object due to contention 80 * @obj: the current GEM object 82 * Iterate over all the locked GEM objects inside the drm_exec object. 95 * @obj: the current GEM object 97 * Iterate over all the locked GEM objects inside the drm_exec object in 116 * drm_exec_until_all_locked - loop until all GEM objects are locked 119 * Core functionality of the drm_exec object. Loops until all GEM objects are 121 * guaranteed that no GEM object is locked. 131 * clean up and re-start the loop to prepare all GEM object [all...] |
| H A D | drm_gem_ttm_helper.h | 18 const struct drm_gem_object *gem); 19 int drm_gem_ttm_vmap(struct drm_gem_object *gem, 21 void drm_gem_ttm_vunmap(struct drm_gem_object *gem, 23 int drm_gem_ttm_mmap(struct drm_gem_object *gem,
|
| /linux/drivers/gpu/drm/exynos/ |
| H A D | exynos_drm_gem.h | 21 * @base: a gem object. 22 * - a new handle to this gem object would be created 46 /* destroy a buffer with gem object */ 49 /* create a new buffer with gem object */ 56 * request gem object creation and buffer allocation as the size 63 /* get fake-offset of gem object that can be used with mmap. */ 68 * get exynos drm object from gem handle, this function could be used for 70 * with this function call, gem object reference count would be increased. 77 * gem object reference count would be decreased. 84 /* get buffer information to memory region allocated by gem in exynos_drm_gem_put() [all...] |
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_mmio_gem.c | 20 * 1. Call xe_mmio_gem_create() to create a GEM object with an mmap-able fake offset. 21 * 2. Use xe_mmio_gem_mmap_offset() on the created GEM object to retrieve the fake offset. 24 * must match the size of the GEM object. 25 * 5. When the region is no longer needed, call xe_mmio_gem_destroy() to release the GEM object. 66 * This function creates a GEM object that exposes an MMIO region with an mmap-able 108 * @gem: the GEM object created with xe_mmio_gem_create() 115 u64 xe_mmio_gem_mmap_offset(struct xe_mmio_gem *gem) in xe_mmio_gem_mmap_offset() argument 117 return drm_vma_node_offset_addr(&gem->base.vma_node); in xe_mmio_gem_mmap_offset() 129 * xe_mmio_gem_destroy - Destroy the GEM object that exposes an MMIO region 130 * @gem: the GEM object to destroy [all …]
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_gem.c | 100 * lifetime of the DRM device @dev which is used at GEM object initialization 104 * pages if the page will be fully within the GEM object size. "always", 149 * drm_gem_init - Initialize the GEM device fields 174 * drm_gem_object_init - initialize an allocated shmem-backed GEM object 180 * Initialize an already allocated GEM object of the specified size with 210 * drm_gem_private_object_init - initialize an allocated private GEM object 215 * Initialize an already allocated GEM object of the specified size with 216 * no GEM provided backing store. Instead the caller is responsible for 247 * Uninitialize an already allocated GEM object when it initialized failed 270 * @obj: GEM objec [all...] |
| H A D | drm_gem_shmem_helper.c | 33 * This library provides helpers for GEM objects backed by shmem buffers 36 * Functions that operate on the GEM object receive struct &drm_gem_shmem_object. 37 * For GEM callback helpers in struct &drm_gem_object functions, see likewise 101 * @shmem: shmem GEM object to initialize 104 * This function initializes an allocated shmem GEM object. 149 * This function creates a shmem GEM object. 163 * cached scatter/gather table for an shmem GEM object. 164 * @shmem: shmem GEM object 186 * drm_gem_shmem_release - Release resources associated with a shmem GEM object. in drm_gem_shmem_release() 187 * @shmem: shmem GEM objec in drm_gem_shmem_release() [all...] |
| H A D | drm_gem_framebuffer_helper.c | 3 * drm gem framebuffer helper functions 44 * drm_gem_fb_get_obj() - Get GEM object backing the framebuffer 93 * drm_gem_fb_destroy - Free GEM backed framebuffer 96 * Frees a GEM backed framebuffer with its backing buffer(s) and the structure 113 * drm_gem_fb_create_handle - Create handle for GEM backed framebuffer 118 * This function creates a handle for the GEM object backing the framebuffer. 140 * @file: DRM file that holds the GEM handle(s) backing the framebuffer 181 drm_dbg_kms(dev, "Failed to lookup GEM object\n"); in drm_gem_fb_init_with_funcs() 192 "GEM object size (%zu) smaller than minimum size (%u) for plane %d\n", in drm_gem_fb_init_with_funcs() 220 * @file: DRM file that holds the GEM handle(s) backing the framebuffer [all …]
|
| H A D | drm_gpuvm.c | 558 * .map.gem.obj = obj, 559 * .map.gem.offset = offset, 680 * // Typically protected with a driver specific GEM gpuva lock 1054 * order to serve as root GEM object providing the &drm_resv shared across 1327 struct drm_gem_object *obj = va->gem.obj; in drm_gpuvm_prepare_range() 1601 INIT_LIST_HEAD(&vm_bo->list.entry.gem); in drm_gpuvm_bo_create() 1618 * Note that this puts a refcount on the GEM object, which may destroy the GEM in drm_gpuvm_bo_destroy_not_in_lists() 1662 list_del(&vm_bo->list.entry.gem); 1676 * hold the lock that the GEM use [all...] |
| /linux/rust/kernel/drm/gem/ |
| H A D | shmem.rs | 3 //! DRM GEM shmem helper objects 16 gem, 35 use gem::{ 41 /// A struct for controlling the creation of shmem-backed GEM objects. 44 /// initially creating a shmem-backed GEM object. 50 /// Reuse the DMA reservation from another GEM object. 56 /// A shmem-backed GEM object. 62 /// - Any type invariants of `C` apply to the parent DRM device for this GEM object. 82 // SAFETY: All GEM objects are thread-safe. 85 // SAFETY: All GEM object [all...] |
| H A D | mod.rs | 3 //! DRM GEM API 37 /// A macro for implementing [`AlwaysRefCounted`] for any GEM object type. 39 /// Since all GEM objects use the same refcounting scheme. 49 // SAFETY: All GEM objects are refcounted. 87 /// GEM object functions, which must be implemented by drivers. in new() 95 /// Create a new driver data object for a GEM object of a given size. 111 /// Trait that represents a GEM object subtype 173 /// Base operations shared by all GEM object classes in create_handle() 213 // - Therefore, we're guaranteed that `ptr` must be a gem object embedded within `Self`. in create_mmap_offset() 237 /// Crate-private base operations shared by all GEM objec [all...] |
| /linux/drivers/gpu/drm/nouveau/ |
| H A D | nouveau_gem.c | 77 nouveau_gem_object_del(struct drm_gem_object *gem) in nouveau_gem_object_del() argument 79 struct nouveau_bo *nvbo = nouveau_gem_object(gem); in nouveau_gem_object_del() 97 nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) in nouveau_gem_object_open() argument 100 struct nouveau_bo *nvbo = nouveau_gem_object(gem); in nouveau_gem_object_open() 183 nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) in nouveau_gem_object_close() argument 186 struct nouveau_bo *nvbo = nouveau_gem_object(gem); in nouveau_gem_object_close() 260 /* Initialize the embedded gem-object. We return a single gem-reference in nouveau_gem_new() 299 nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem, in nouveau_gem_info() argument 303 struct nouveau_bo *nvbo = nouveau_gem_object(gem); in nouveau_gem_info() 372 nouveau_gem_set_domain(struct drm_gem_object *gem, uint32_t read_domains, in nouveau_gem_set_domain() argument [all …]
|
| /linux/drivers/gpu/drm/tests/ |
| H A D | drm_gem_shmem_test.c | 3 * KUnit test suite for GEM objects backed by shmem buffers 43 * Test creating a shmem GEM object backed by shmem buffer. The test 44 * case succeeds if the GEM object is successfully allocated with the 63 * Test creating a shmem GEM object from a scatter/gather table exported 64 * via a DMA-BUF. The test case succeed if the GEM object is successfully 129 * Test pinning backing pages for a shmem GEM object. The test case 161 * Test creating a virtual mapping for a shmem GEM object. The test 198 * PRIME usage from a shmem GEM object. The test case succeeds if a 243 * driver usage from a shmem GEM object. The test case succeeds if the 277 * Test updating the madvise state of a shmem GEM object. The test [all …]
|
| /linux/drivers/net/ethernet/sun/ |
| H A D | sungem.c | 3 * sungem.c: Sun GEM ethernet driver. 82 MODULE_DESCRIPTION("Sun GEM Gbit ethernet driver"); 85 #define GEM_MODULE_NAME "gem" 90 /* These models only differ from the original GEM in 109 static u16 __sungem_phy_read(struct gem *gp, int phy_addr, int reg) 137 struct gem *gp = netdev_priv(dev); in __sungem_phy_read() 141 static inline u16 sungem_phy_read(struct gem *gp, int reg) in __sungem_phy_read() 146 static void __sungem_phy_write(struct gem *gp, int phy_addr, int reg, u16 val) in _sungem_phy_read() 170 struct gem *gp = netdev_priv(dev); in __sungem_phy_write() 174 static inline void sungem_phy_write(struct gem *g in __sungem_phy_write() [all...] |
| /linux/include/uapi/drm/ |
| H A D | tegra_drm.h | 19 * struct drm_tegra_gem_create - parameters for the GEM object creation IOCTL 32 * A bitmask of flags that influence the creation of GEM objects: 45 * The handle of the created GEM object. Set by the kernel upon 52 * struct drm_tegra_gem_mmap - parameters for the GEM mmap IOCTL 58 * Handle of the GEM object to obtain an mmap offset for. 72 * The mmap offset for the given GEM object. Set by the kernel upon 276 * Handle to a GEM object containing the command buffer. 283 * Offset, in bytes, into the GEM object identified by @handle at 304 * struct drm_tegra_reloc - GEM object relocation structure 312 * Handle to the GEM objec [all...] |
| /linux/drivers/gpu/drm/gma500/ |
| H A D | gem.c | 3 * psb GEM interface 11 * accelerated operations on a GEM object) 22 #include "gem.h" 26 * PSB GEM object 166 /* GEM object */ in psb_gem_create() 217 pobj = psb_gem_create(dev, size, "gem", false, PAGE_SIZE); in psb_gem_dumb_create() 240 * psb_gem_fault - pagefault handler for GEM objects 243 * Invoked when a fault occurs on an mmap of a GEM managed area. GEM 251 * The VMA was set up by GEM. In doing so it also ensured that the 252 * vma->vm_private_data points to the GEM object that is backing this [all …]
|
| /linux/Documentation/gpu/ |
| H A D | drm-vm-bind-locking.rst | 34 a GEM object or anonymous or page-cache pages mapped also into the CPU 36 * ``gpu_vm_bo``: Abstracts the association of a GEM object and 37 a VM. The GEM object maintains a list of gpu_vm_bos, where each gpu_vm_bo 50 gpu_vm or a GEM object. The dma_resv contains an array / list 63 * ``local object``: A GEM object which is only mapped within a 64 single VM. Local GEM objects share the gpu_vm's dma_resv. 65 * ``external object``: a.k.a shared object: A GEM object which may be shared 72 One of the benefits of VM_BIND is that local GEM objects share the gpu_vm's 74 number of local GEM objects, only one lock is needed to make the exec 98 GEM objects. [all …]
|
| /linux/drivers/gpu/drm/loongson/ |
| H A D | lsdc_ttm.h | 26 /* Protected by gem.mutex */ 47 static inline struct ttm_buffer_object *to_ttm_bo(struct drm_gem_object *gem) in to_ttm_bo() argument 49 return container_of(gem, struct ttm_buffer_object, base); in to_ttm_bo() 57 static inline struct lsdc_bo *gem_to_lsdc_bo(struct drm_gem_object *gem) in gem_to_lsdc_bo() argument 59 return container_of(gem, struct lsdc_bo, tbo.base); in gem_to_lsdc_bo()
|
| /linux/drivers/gpu/drm/msm/ |
| H A D | msm_gem_vma.c | 89 * original GEM object backing the mapping that will be unmapped. 121 /** @bos_pinned: are the GEM objects being bound pinned? */ 133 * This table also serves to hold a reference to the backing GEM 330 .offset = vma->gem.offset, in msm_gem_vma_map() 354 if (vma->gem.obj) in msm_gem_vma_close() 355 msm_gem_assert_locked(vma->gem.obj); in msm_gem_vma_close() 408 .gem.obj = obj, in msm_gem_vma_new() 409 .gem.offset = offset, in msm_gem_vma_new() 490 return msm_gem_vma_new(arg->job->vm, op->gem.obj, op->gem in vma_from_op() [all...] |
| /linux/drivers/net/ethernet/cadence/ |
| H A D | Kconfig | 23 tristate "Cadence MACB/GEM support" 30 AT91 parts. This driver also supports the Cadence GEM (Gigabit 32 support for the MACB/GEM chip. 46 tristate "Cadence PCI MACB/GEM support"
|
| /linux/drivers/gpu/drm/nova/ |
| H A D | file.rs | 4 use crate::gem::NovaObject; 7 drm::{self, gem::BaseObject}, 44 /// IOCTL: gem_create: Create a new DRM GEM object. 57 /// IOCTL: gem_info: Query GEM metadata.
|