Home
last modified time | relevance | path

Searched full:gem (Results 1 – 25 of 488) sorted by relevance

12345678910>>...20

/linux-6.12.1/drivers/gpu/drm/tegra/
Dgem.c3 * 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
79 if (gem->import_attach) { in tegra_bo_pin()
80 struct dma_buf *buf = gem->import_attach->dmabuf; in tegra_bo_pin()
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()
[all …]
Dgem.h3 * Tegra host1x GEM implementation
36 struct drm_gem_object gem; member
52 static inline struct tegra_bo *to_tegra_bo(struct drm_gem_object *gem) in to_tegra_bo() argument
54 return container_of(gem, struct tegra_bo, gem); in to_tegra_bo()
69 void tegra_bo_free_object(struct drm_gem_object *gem);
75 int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma);
78 struct dma_buf *tegra_gem_prime_export(struct drm_gem_object *gem,
Dfb.c18 #include "gem.h"
120 fb->obj[i] = &planes[i]->gem; in tegra_fb_alloc()
139 struct drm_gem_object *gem; in tegra_fb_create() local
149 gem = drm_gem_object_lookup(file, cmd->handles[i]); in tegra_fb_create()
150 if (!gem) { in tegra_fb_create()
160 if (gem->size < size) { in tegra_fb_create()
162 drm_gem_object_put(gem); in tegra_fb_create()
166 planes[i] = to_tegra_bo(gem); in tegra_fb_create()
179 drm_gem_object_put(&planes[i]->gem); in tegra_fb_create()
/linux-6.12.1/drivers/gpu/drm/
Ddrm_gem_ttm_helper.c12 * This library provides helper functions for gem objects backed by
20 * @gem: GEM object
26 const struct drm_gem_object *gem) in drm_gem_ttm_print_info() argument
42 const struct ttm_buffer_object *bo = drm_gem_ttm_of_gem(gem); in drm_gem_ttm_print_info()
56 * @gem: GEM object.
59 * Maps a GEM object with ttm_bo_vmap(). This function can be used as
65 int drm_gem_ttm_vmap(struct drm_gem_object *gem, in drm_gem_ttm_vmap() argument
68 struct ttm_buffer_object *bo = drm_gem_ttm_of_gem(gem); in drm_gem_ttm_vmap()
76 * @gem: GEM object.
79 * Unmaps a GEM object with ttm_bo_vunmap(). This function can be used as
[all …]
Ddrm_gem_vram_helper.c29 * This library provides &struct drm_gem_vram_object (GEM VRAM), a GEM
34 * manager for simple framebuffer devices with dedicated video memory. GEM
38 * With the GEM interface userspace applications create, manage and destroy
39 * graphics buffers, such as an on-screen framebuffer. GEM does not provide
46 * left in VRAM, inactive GEM objects can be moved to system memory.
83 * interfaces for GEM buffer management and initializes file operations to
84 * allow for accessing created GEM buffers. With this setup, the DRM driver
85 * manages an area of video RAM with VRAM MM and provides GEM VRAM objects
117 * up; only release the GEM object. in drm_gem_vram_cleanup()
170 * drm_gem_vram_create() - Creates a VRAM-backed GEM object
[all …]
Ddrm_client.c31 * GEM drivers which provide a GEM based dumb buffer with a virtual address are supported.
270 if (buffer->gem) { in drm_client_buffer_delete()
271 drm_gem_vunmap_unlocked(buffer->gem, &buffer->map); in drm_client_buffer_delete()
272 drm_gem_object_put(buffer->gem); in drm_client_buffer_delete()
309 buffer->gem = obj; in drm_client_buffer_create()
343 struct drm_gem_object *gem = buffer->gem; in drm_client_buffer_vmap_local() local
347 drm_gem_lock(gem); in drm_client_buffer_vmap_local()
349 ret = drm_gem_vmap(gem, map); in drm_client_buffer_vmap_local()
357 drm_gem_unlock(gem); in drm_client_buffer_vmap_local()
372 struct drm_gem_object *gem = buffer->gem; in drm_client_buffer_vunmap_local() local
[all …]
Ddrm_exec.c11 * multiple GEM objects while preparing hardware operations (e.g. command
14 * If a contention is detected while locking a GEM object the cleanup procedure
15 * unlocks all previously locked GEM objects and locks the contended one first
19 * dma_resv object inside the GEM object.
197 * drm_exec_lock_obj - lock a GEM object for use
199 * @obj: the GEM object to lock
201 * Lock a GEM object for use and grab a reference to it.
252 * drm_exec_unlock_obj - unlock a GEM object in this exec context
254 * @obj: the GEM object to unlock
256 * Unlock the GEM object and remove it from the collection of locked objects.
[all …]
Ddrm_prime.c48 * Similar to GEM global names, PRIME file descriptors are also used to share
51 * between applications, they can't be guessed like the globally unique GEM
59 * Reference Counting for GEM Drivers
65 * and stores the exporting GEM object in the &dma_buf.priv field. This
68 * GEM-based drivers, the &dma_buf should be exported using
72 * importing GEM object -> dma-buf -> exported GEM bo. A further complication
75 * is required to allow userspace to detect duplicated imports, since some GEM
82 * it will get a fd->handle request for a GEM object that it created. Drivers
84 * dma-buf private. For GEM based drivers this is handled in
231 * drm_gem_dmabuf_export - &dma_buf export implementation for GEM
[all …]
Ddrm_gem_dma_helper.c3 * drm gem DMA helper functions
29 * The DRM GEM/DMA helpers are a means to provide buffer objects that are
43 * For GEM callback helpers in struct &drm_gem_object functions, see likewise
58 * __drm_gem_dma_create - Create a GEM DMA object without allocating memory
63 * This function creates and initializes a GEM DMA object of the given size,
121 * This function creates a DMA GEM object and allocates memory as backing store.
173 * return a GEM handle to it
177 * @handle: return location for the GEM handle
179 * This function creates a DMA GEM object, allocating a chunk of memory as
180 * backing store. The GEM object is then added to the list of object associated
[all …]
Ddrm_gem_shmem_helper.c30 * This library provides helpers for GEM objects backed by shmem buffers
33 * Functions that operate on the GEM object receive struct &drm_gem_shmem_object.
34 * For GEM callback helpers in struct &drm_gem_object functions, see likewise
118 * This function creates a shmem GEM object.
131 * drm_gem_shmem_free - Free resources associated with a shmem GEM object
132 * @shmem: shmem GEM object to free
134 * This function cleans up the GEM object state and frees the memory used to
201 * drm_gem_shmem_put_pages - Decrease use count on the backing pages for a shmem GEM object
202 * @shmem: shmem GEM object
253 * drm_gem_shmem_pin - Pin backing pages for a shmem GEM object
[all …]
Ddrm_gem.c90 * drm_gem_init - Initialize the GEM device fields
117 * drm_gem_object_init - initialize an allocated shmem-backed GEM object
122 * Initialize an already allocated GEM object of the specified size with
143 * drm_gem_private_object_init - initialize an allocated private GEM object
148 * Initialize an already allocated GEM object of the specified size with
149 * no GEM provided backing store. Instead the caller is responsible for
179 * Uninitialize an already allocated GEM object when it initialized failed
191 * @obj: GEM object to clean up.
272 * Removes the GEM handle from the @filp lookup table which has been added with
274 * resources like GEM names.
[all …]
/linux-6.12.1/Documentation/gpu/
Ddrm-mm.rst12 (TTM) and Graphics Execution Manager (GEM). TTM was the first DRM memory
20 GEM started as an Intel-sponsored project in reaction to TTM's
22 providing a solution to every graphics memory-related problems, GEM
24 share it. GEM has simpler initialization and execution requirements than
79 The Graphics Execution Manager (GEM)
82 The GEM design approach has resulted in a memory manager that doesn't
84 userspace or kernel API. GEM exposes a set of standard memory-related
89 The GEM userspace API is described in the `GEM - the Graphics Execution
91 slightly outdated, the document provides a good overview of the GEM API
93 as part of the common GEM API, are currently implemented using
[all …]
/linux-6.12.1/drivers/gpu/drm/i915/
DMakefile139 # GEM (Graphics Execution Management) code
140 gem-y += \
141 gem/i915_gem_busy.o \
142 gem/i915_gem_clflush.o \
143 gem/i915_gem_context.o \
144 gem/i915_gem_create.o \
145 gem/i915_gem_dmabuf.o \
146 gem/i915_gem_domain.o \
147 gem/i915_gem_execbuffer.o \
148 gem/i915_gem_internal.o \
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/net/
Dcdns,macb.yaml7 title: Cadence MACB/GEM Ethernet controller
23 - cdns,zynq-gem # Xilinx Zynq-7xxx SoC
24 - cdns,zynqmp-gem # Xilinx Zynq Ultrascale+ MPSoC
25 - const: cdns,gem # Generic
30 - xlnx,versal-gem # Xilinx Versal
31 - xlnx,zynq-gem # Xilinx Zynq-7xxx SoC
32 - xlnx,zynqmp-gem # Xilinx Zynq Ultrascale+ MPSoC
33 - const: cdns,gem # Generic
50 - atmel,sama5d29-gem # GEM XL IP (10/100) on Atmel sama5d29 SoCs
51 - atmel,sama5d2-gem # GEM IP (10/100) on Atmel sama5d2 SoCs
[all …]
/linux-6.12.1/include/drm/
Ddrm_gem_shmem_helper.h21 * struct drm_gem_shmem_object - GEM object backed by shmem
25 * @base: Base GEM object
134 * GEM object functions
138 * drm_gem_shmem_object_free - GEM object function for drm_gem_shmem_free()
139 * @obj: GEM object to free
155 * @obj: GEM object
169 * drm_gem_shmem_object_pin - GEM object function for drm_gem_shmem_pin()
170 * @obj: GEM object
183 * drm_gem_shmem_object_unpin - GEM object function for drm_gem_shmem_unpin()
184 * @obj: GEM object
[all …]
Ddrm_gem_dma_helper.h12 * 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 …]
Ddrm_gem.h5 * GEM Graphics Execution Manager Driver Interfaces
58 * become puregeable until it becomes idle. The status gem object func does
67 * struct drm_gem_object_funcs - GEM object functions
82 * Called upon GEM handle creation.
91 * Called upon GEM handle release.
178 * Handle mmap() of the gem object, setup vma accordingly.
191 * Evicts gem object out from memory. Used by the drm_gem_object_evict()
233 * A helper for tracking GEM objects in a given state, to aid in
243 * Lock protecting movement of GEM objects between LRUs. All
252 * The total number of backing pages of the GEM objects in
[all …]
Ddrm_exec.h44 * @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 …]
Ddrm_gem_vram_helper.h33 * struct drm_gem_vram_object - GEM object backed by VRAM
40 * The type struct drm_gem_vram_object represents a GEM object that is
45 * GEM VRAM objects perform reference counting for pin and mapping
73 * Returns: The containing GEM VRAM object
83 * &struct drm_gem_vram_object for field gem.
84 * @gem: the GEM object
85 * Returns: The containing GEM VRAM object
88 struct drm_gem_object *gem) in drm_gem_vram_of_gem() argument
90 return container_of(gem, struct drm_gem_vram_object, bo.base); in drm_gem_vram_of_gem()
132 * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This
[all …]
/linux-6.12.1/drivers/gpu/drm/exynos/
Dexynos_drm_gem.h21 * @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-6.12.1/drivers/gpu/drm/panthor/
Dpanthor_gem.h17 * struct panthor_gem_object - Driver specific GEM object.
24 * @exclusive_vm_root_gem: Root GEM of the exclusive VM this GEM object
27 * If @exclusive_vm_root_gem != NULL, any attempt to bind the GEM to a
30 * All FW memory objects have this field set to the root GEM of the MCU
41 * We can't use the GEM resv for that, because drm_gpuva_link() is
60 * @obj: The GEM object backing this kernel buffer object.
70 * @va_node: VA space allocated to this GEM.
75 * @kmap: Kernel CPU mapping of @gem.
/linux-6.12.1/drivers/gpu/drm/nouveau/
Dnouveau_gem.c77 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()
90 if (gem->import_attach) in nouveau_gem_object_del()
91 drm_prime_gem_destroy(gem, nvbo->bo.sg); in nouveau_gem_object_del()
100 nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) in nouveau_gem_object_open() argument
103 struct nouveau_bo *nvbo = nouveau_gem_object(gem); in nouveau_gem_object_open()
186 nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) in nouveau_gem_object_close() argument
189 struct nouveau_bo *nvbo = nouveau_gem_object(gem); in nouveau_gem_object_close()
263 /* Initialize the embedded gem-object. We return a single gem-reference in nouveau_gem_new()
302 nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem, in nouveau_gem_info() argument
[all …]
/linux-6.12.1/drivers/gpu/drm/tests/
Ddrm_gem_shmem_test.c3 * KUnit test suite for GEM objects backed by shmem buffers
38 * Test creating a shmem GEM object backed by shmem buffer. The test
39 * case succeeds if the GEM object is successfully allocated with the
58 * Test creating a shmem GEM object from a scatter/gather table exported
59 * via a DMA-BUF. The test case succeed if the GEM object is successfully
124 * Test pinning backing pages for a shmem GEM object. The test case
156 * Test creating a virtual mapping for a shmem GEM object. The test
193 * PRIME usage from a shmem GEM object. The test case succeeds if a
232 * driver usage from a shmem GEM object. The test case succeeds if the
266 * Test updating the madvise state of a shmem GEM object. The test
[all …]
/linux-6.12.1/drivers/gpu/drm/mediatek/
Dmtk_gem.h14 * @base: a gem object.
15 * - a new handle to this gem object would be created
18 * @kvaddr: kernel virtual address of gem buffer.
19 * @dma_addr: dma address of gem buffer.
20 * @dma_attrs: dma attributes of gem buffer.
37 void mtk_gem_free_object(struct drm_gem_object *gem);
/linux-6.12.1/drivers/gpu/drm/gma500/
Dgem.c3 * psb GEM interface
11 * accelerated operations on a GEM object)
21 #include "gem.h"
25 * PSB GEM object
165 /* GEM object */ in psb_gem_create()
216 pobj = psb_gem_create(dev, size, "gem", false, PAGE_SIZE); in psb_gem_dumb_create()
239 * psb_gem_fault - pagefault handler for GEM objects
242 * Invoked when a fault occurs on an mmap of a GEM managed area. GEM
250 * The VMA was set up by GEM. In doing so it also ensured that the
251 * vma->vm_private_data points to the GEM object that is backing this
[all …]

12345678910>>...20