| /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->size; in tegra_bo_pin() 221 drm_gem_object_get(&obj->gem); in tegra_bo_get() [all …]
|
| H A D | fb.c | 19 #include "gem.h" 122 fb->obj[i] = &planes[i]->gem; in tegra_fb_alloc() 141 struct drm_gem_object *gem; in tegra_fb_create() local 151 gem = drm_gem_object_lookup(file, cmd->handles[i]); in tegra_fb_create() 152 if (!gem) { in tegra_fb_create() 162 if (gem->size < size) { in tegra_fb_create() 164 drm_gem_object_put(gem); in tegra_fb_create() 168 planes[i] = to_tegra_bo(gem); in tegra_fb_create() 181 drm_gem_object_put(&planes[i]->gem); in tegra_fb_create()
|
| 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() [all …]
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_gem_vram_helper.c | 30 * This library provides &struct drm_gem_vram_object (GEM VRAM), a GEM 35 * manager for simple framebuffer devices with dedicated video memory. GEM 39 * With the GEM interface userspace applications create, manage and destroy 40 * graphics buffers, such as an on-screen framebuffer. GEM does not provide 47 * left in VRAM, inactive GEM objects can be moved to system memory. 84 * interfaces for GEM buffer management and initializes file operations to 85 * allow for accessing created GEM buffers. With this setup, the DRM driver 86 * manages an area of video RAM with VRAM MM and provides GEM VRAM objects 113 * up; only release the GEM object. in drm_gem_vram_cleanup() 166 * drm_gem_vram_create() - Creates a VRAM-backed GEM object [all …]
|
| H A D | drm_prime.c | 49 * Similar to GEM global names, PRIME file descriptors are also used to share 52 * between applications, they can't be guessed like the globally unique GEM 60 * Reference Counting for GEM Drivers 66 * and stores the exporting GEM object in the &dma_buf.priv field. This 69 * GEM-based drivers, the &dma_buf should be exported using 73 * importing GEM object -> dma-buf -> exported GEM bo. A further complication 76 * is required to allow userspace to detect duplicated imports, since some GEM 83 * it will get a fd->handle request for a GEM object that it created. Drivers 85 * dma-buf private. For GEM based drivers this is handled in 228 * drm_gem_dmabuf_export - &dma_buf export implementation for GEM [all …]
|
| 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 object [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. 162 * drm_gem_shmem_release - Release resources associated with a shmem GEM object. 163 * @shmem: shmem GEM object 165 * This function cleans up the GEM object state, but does not free the memory used to store the 166 * object itself. This function is meant to be a dedicated helper for the Rust GEM bindings. [all …]
|
| H A D | drm_gem_dma_helper.c | 3 * drm gem DMA helper functions 31 * The DRM GEM/DMA helpers are a means to provide buffer objects that are 45 * For GEM callback helpers in struct &drm_gem_object functions, see likewise 60 * __drm_gem_dma_create - Create a GEM DMA object without allocating memory 65 * This function creates and initializes a GEM DMA object of the given size, 123 * This function creates a DMA GEM object and allocates memory as backing store. 175 * return a GEM handle to it 179 * @handle: return location for the GEM handle 181 * This function creates a DMA GEM object, allocating a chunk of memory as 182 * backing store. The GEM object is then added to the list of object associated [all …]
|
| H A D | drm_client.c | 33 * GEM drivers which provide a GEM based dumb buffer with a virtual address are supported. 187 struct drm_gem_object *gem; in drm_client_buffer_delete() local 193 gem = buffer->fb->obj[0]; in drm_client_buffer_delete() 194 drm_gem_vunmap(gem, &buffer->map); in drm_client_buffer_delete() 201 drm_gem_object_put(buffer->gem); in drm_client_buffer_delete() 255 buffer->gem = obj; in drm_client_buffer_create() 292 struct drm_gem_object *gem = buffer->fb->obj[0]; in drm_client_buffer_vmap_local() local 296 drm_gem_lock(gem); in drm_client_buffer_vmap_local() 298 ret = drm_gem_vmap_locked(gem, map); in drm_client_buffer_vmap_local() 306 drm_gem_unlock(gem); in drm_client_buffer_vmap_local() [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 | 557 * .map.gem.obj = obj, 558 * .map.gem.offset = offset, 679 * // Typically protected with a driver specific GEM gpuva lock 1053 * order to serve as root GEM object providing the &drm_resv shared across 1323 struct drm_gem_object *obj = va->gem.obj; in drm_gpuvm_prepare_range() 1595 INIT_LIST_HEAD(&vm_bo->list.entry.gem); in drm_gpuvm_bo_create() 1612 * Note that this puts a refcount on the GEM object, which may destroy the GEM 1656 list_del(&vm_bo->list.entry.gem); in drm_gpuvm_bo_destroy() 1670 * hold the lock that the GEM uses for its gpuva list (either the GEM's 1694 * refcount drops to zero. Must be called with GEM mutex held. After releasing [all …]
|
| /linux/include/drm/ |
| 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 | 44 * @contended: contended GEM object we backed off for 49 * @prelocked: already locked GEM object due to contention 72 * @obj: the current GEM object 74 * Iterate over all the locked GEM objects inside the drm_exec object. 84 * @obj: the current GEM object 86 * Iterate over all the locked GEM objects inside the drm_exec object in 95 * drm_exec_until_all_locked - loop until all GEM objects are locked 98 * Core functionality of the drm_exec object. Loops until all GEM objects are 100 * guaranteed that no GEM object is locked. 118 * clean up and re-start the loop to prepare all GEM objects. [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 49 /* destroy a buffer with gem object */ 52 /* create a new buffer with gem object */ 59 * request gem object creation and buffer allocation as the size 66 /* get fake-offset of gem object that can be used with mmap. */ 71 * get exynos drm object from gem handle, this function could be used for 73 * with this function call, gem object reference count would be increased. 80 * gem object reference count would be decreased. 87 /* get buffer information to memory region allocated by gem. */ [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/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" 91 /* These models only differ from the original GEM in 117 static u16 __sungem_phy_read(struct gem *gp, int phy_addr, int reg) in __sungem_phy_read() 145 struct gem *gp = netdev_priv(dev); in _sungem_phy_read() 149 static inline u16 sungem_phy_read(struct gem *gp, int reg) in sungem_phy_read() 154 static void __sungem_phy_write(struct gem *gp, int phy_addr, int reg, u16 val) in __sungem_phy_write() 178 struct gem *gp = netdev_priv(dev); in _sungem_phy_write() 182 static inline void sungem_phy_write(struct gem *gp, int reg, u16 val) 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 311 * Handle to the GEM object containing the command buffer for [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/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() 402 .gem.obj = obj, in msm_gem_vma_new() 403 .gem.offset = offset, in msm_gem_vma_new() 484 return msm_gem_vma_new(arg->job->vm, op->gem.obj, op->gem.offset, in vma_from_op() 493 struct drm_gem_object *obj = op->map.gem.obj; in msm_gem_vm_sm_step_map() [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/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"
|