Home
last modified time | relevance | path

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

1234567891011

/linux/include/drm/
H A 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 …]
H A Ddrm_exec.h50 * @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
105 * drm_exec_until_all_locked - loop until all GEM objects are locked
108 * Core functionality of the drm_exec object. Loops until all GEM objects are
110 * guaranteed that no GEM object is locked.
129 * clean up and re-start the loop to prepare all GEM objects.
[all …]
H A Ddrm_gem_ttm_helper.h18 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/xe/
H A Dxe_mmio_gem.c20 * 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.
40 struct page *dummy_page; /* protected by the GEM's dma_resv */
41 bool destroyed; /* protected by the GEM's dma_resv */
48 * matching the GEM object exactly. in xe_mmio_gem_vm_may_split()
78 * This function creates a GEM object that exposes an MMIO region with an mmap-able
120 * @gem: the GEM object created with xe_mmio_gem_create()
127 u64 xe_mmio_gem_mmap_offset(struct xe_mmio_gem *gem) in xe_mmio_gem_mmap_offset() argument
[all …]
/linux/drivers/gpu/drm/
H A Ddrm_gem_shmem_helper.c33 * 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.
187 * @shmem: shmem GEM object
[all …]
H A Ddrm_prime.c49 * 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 Ddrm_exec.c13 * multiple GEM objects while preparing hardware operations (e.g. command
16 * If a contention is detected while locking a GEM object the cleanup procedure
17 * unlocks all previously locked GEM objects and locks the contended one first
21 * dma_resv object inside the GEM object.
194 * drm_exec_lock_obj - lock a GEM object for use
196 * @obj: the GEM object to lock
198 * Lock a GEM object for use and grab a reference to it.
249 * drm_exec_unlock_obj - unlock a GEM object in this exec context
251 * @obj: the GEM object to unlock
253 * Unlock the GEM object and remove it from the collection of locked objects.
[all …]
H A Ddrm_gem_framebuffer_helper.c3 * 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 …]
/linux/rust/kernel/drm/gem/
H A Dshmem.rs3 //! DRM GEM shmem helper objects
21 gem,
63 use gem::{
70 /// A struct for controlling the creation of shmem-backed GEM objects.
73 /// initially creating a shmem-backed GEM object.
78 /// Reuse the DMA reservation from another GEM object.
94 /// A shmem-backed GEM object.
122 // SAFETY: All GEM objects are thread-safe. in new()
125 // SAFETY: All GEM objects are thread-safe. in new()
129 /// `drm_gem_object_funcs` vtable suitable for GEM shme in new()
[all...]
H A Dmod.rs3 //! 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.
86 /// GEM object functions, which must be implemented by drivers. in new()
94 /// Create a new driver data object for a GEM object of a given size. in open()
110 /// 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 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()
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()
381 nouveau_gem_set_domain(struct drm_gem_object *gem, uint32_t read_domains, in nouveau_gem_set_domain() argument
[all …]
H A Dnouveau_uvmm.c10 * mapping to it's backing GEM must be performed under this lock.
76 } gem; member
195 u64 offset = uvma->va.gem.offset; in nouveau_uvma_map()
237 drm_gem_object_get(uvma->va.gem.obj); in nouveau_uvma_gem_get()
243 drm_gem_object_put(uvma->va.gem.obj); in nouveau_uvma_gem_put()
464 (op->gem.offset & non_page_bits) == 0; in op_map_aligned_to_page_shift()
470 struct nouveau_bo *nvbo = nouveau_gem_object(op->gem.obj); in select_page_shift()
508 drm_WARN_ONCE(op->gem.obj->dev, 1, "Could not find an appropriate page size.\n"); in select_page_shift()
829 return op->map.gem.obj; in op_gem_obj()
833 * the GEM backing the unmapped GPUVA. in op_gem_obj()
[all …]
H A Dnouveau_gem.h11 nouveau_gem_object(struct drm_gem_object *gem) in nouveau_gem_object() argument
13 return gem ? container_of(gem, struct nouveau_bo, bo.base) : NULL; in nouveau_gem_object()
/linux/drivers/gpu/drm/tests/
H A Ddrm_gem_shmem_test.c3 * 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
125 * Test pinning backing pages for a shmem GEM object. The test case
157 * Test creating a virtual mapping for a shmem GEM object. The test
194 * PRIME usage from a shmem GEM object. The test case succeeds if a
239 * driver usage from a shmem GEM object. The test case succeeds if the
273 * Test updating the madvise state of a shmem GEM object. The test
[all …]
/linux/drivers/net/ethernet/sun/
H A Dsungem.c3 * 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) in __sungem_phy_read()
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_write()
170 struct gem *gp = netdev_priv(dev); in _sungem_phy_write()
174 static inline void sungem_phy_write(struct gem *gp, int reg, u16 val) in sungem_phy_write()
[all …]
/linux/Documentation/gpu/
H A Ddrm-vm-bind-locking.rst34 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 Dlsdc_ttm.h26 /* 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 Dmsm_gem_vma.c89 * 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()
492 return msm_gem_vma_new(arg->job->vm, op->gem.obj, op->gem.offset, in vma_from_op()
501 struct drm_gem_object *obj = op->map.gem.obj; in msm_gem_vm_sm_step_map()
[all …]
/linux/drivers/net/ethernet/cadence/
H A DKconfig23 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/include/uapi/drm/
H A Dexynos_drm.h31 * @handle: returned a handle to created gem object.
32 * - this handle will be set by gem module of kernel side.
43 * @handle: handle of gem object.
45 * @offset: a fake-offset of gem object.
54 * A structure to gem information.
56 * @handle: a handle to gem object created.
59 * @size: size to memory region allocated by gem and this size would
353 /* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
H A Dqaic_accel.h173 * @handle: Out. GEM handle for the BO.
184 * @handle: In. Handle of the GEM BO to prepare for mmap().
243 * @handle: In. GEM handle of the BO to slice.
267 * @handle: In. GEM handle of the BO to commit to the device.
277 * @handle: In. GEM handle of the BO to commit to the device.
311 * @handle: In. GEM handle of the BO to wait on.
347 * @handle: In. GEM handle of the BO to get perf stats for.
367 * @handle: In. GEM handle of the BO to detach slicing configuration.
/linux/drivers/gpu/drm/i915/gem/
H A Di915_gem_ttm.c19 #include "gem/i915_gem_mman.h"
20 #include "gem/i915_gem_object.h"
21 #include "gem/i915_gem_region.h"
22 #include "gem/i915_gem_ttm.h"
23 #include "gem/i915_gem_ttm_move.h"
24 #include "gem/i915_gem_ttm_pm.h"
48 * different from the cached gem object io scatter-gather table which
388 * @obj: The GEM object
557 * @obj: The GEM object used for sg-table caching
863 * GEM migration may not be the same as TTM migration / eviction. If
[all …]
/linux/tools/perf/trace/beauty/include/uapi/drm/
H A Ddrm.h628 * @handle: The handle of a gem object.
629 * @new_handle: An available gem handle.
631 * This ioctl changes the handle of a GEM object to the specified one.
1092 * DRM_IOCTL_GEM_CLOSE - Close a GEM handle.
1094 * GEM handles are not reference-counted by the kernel. User-space is
1096 * the same memory object twice on the same DRM file description, the same GEM
1101 * and always returns fresh new GEM handles even if an existing GEM handle
1145 * DRM_IOCTL_PRIME_HANDLE_TO_FD - Convert a GEM handle to a DMA-BUF FD.
1147 * User-space sets &drm_prime_handle.handle with the GEM handle to export and
1152 * not supported for this specific GEM handle (but might be for others).
[all …]
/linux/drivers/gpu/drm/xe/display/
H A Dxe_display_bo.c94 struct drm_gem_object *gem = drm_gem_object_lookup(filp, mode_cmd->handles[0]); in xe_display_bo_framebuffer_lookup() local
96 if (!gem) in xe_display_bo_framebuffer_lookup()
99 bo = gem_to_xe_bo(gem); in xe_display_bo_framebuffer_lookup()
104 drm_gem_object_put(gem); in xe_display_bo_framebuffer_lookup()
108 return gem; in xe_display_bo_framebuffer_lookup()
/linux/tools/include/uapi/drm/
H A Ddrm.h

1234567891011