search for: drm_gpuva_link

Displaying 8 results from an estimated 8 matches for "drm_gpuva_link".

2023 Aug 20
3
[PATCH drm-misc-next 0/3] [RFC] DRM GPUVA Manager GPU-VM features
So far the DRM GPUVA manager offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA mappings to their backing buffers and perform more complex mapping operations on the GPU VA space. However, there are more design patterns commonly used by drivers, which can potentially be generalized in order to make the DRM GPUVA manager represent a basic GPU-VM
2023 Jul 17
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...buffers GPU VA lists by itself; drivers are responsible to > + * enforce mutual exclusion using either the GEMs dma_resv lock or alternatively > + * a driver specific external lock by setting the @DRM_GPUVA_MANAGER_LOCK_EXTERN > + * flag. > + * > + * For the latter, functions such as drm_gpuva_link() or drm_gpuva_unlink() > + * contain lockdep checks to indicate locking issues. For this to work drivers > + * must provide (in case the @DRM_GPUVA_MANAGER_LOCK_EXTERN flag is set) their > + * external lock with drm_gpuva_manager_set_ext_lock() after initialization. > + */ >
2023 Aug 31
3
[PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation
.../** >>>>>>> @@ -140,7 +144,7 @@ struct drm_gpuva { >>>>>>> int drm_gpuva_insert(struct drm_gpuva_manager *mgr, struct drm_gpuva *va); >>>>>>> void drm_gpuva_remove(struct drm_gpuva *va); >>>>>>> -void drm_gpuva_link(struct drm_gpuva *va); >>>>>>> +void drm_gpuva_link(struct drm_gpuva *va, struct drm_gpuva_gem *vm_bo); >>>>>>> void drm_gpuva_unlink(struct drm_gpuva *va); >>>>>>> struct drm_gpuva *drm_gpuva_find(struct drm_gpuva_manager *mg...
2023 Jul 06
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...t *ctx = __ctx; >> + * >> + * drm_gpuva_remap(ctx->prev_va, ctx->next_va, &op->remap); >> + * >> + * drm_gpuva_unlink(op->remap.unmap->va); >> + * kfree(op->remap.unmap->va); >> + * >> + * if (op->remap.prev) { >> + * drm_gpuva_link(ctx->prev_va); > > I ended up switching to dma_resv-based locking for the GEMs and I > wonder what the locking is supposed to look like in the async-mapping > case, where we insert/remove the VA nodes in the drm_sched::run_job() > path. If you decide to pick the interface where...
2023 Jul 13
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...+ * &drm_gem_object buffers GPU VA lists by itself; drivers are responsible to + * enforce mutual exclusion using either the GEMs dma_resv lock or alternatively + * a driver specific external lock by setting the @DRM_GPUVA_MANAGER_LOCK_EXTERN + * flag. + * + * For the latter, functions such as drm_gpuva_link() or drm_gpuva_unlink() + * contain lockdep checks to indicate locking issues. For this to work drivers + * must provide (in case the @DRM_GPUVA_MANAGER_LOCK_EXTERN flag is set) their + * external lock with drm_gpuva_manager_set_ext_lock() after initialization. + */ + +/** + * DOC: Examples + * + *...
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...+ * &drm_gem_object buffers GPU VA lists by itself; drivers are responsible to + * enforce mutual exclusion using either the GEMs dma_resv lock or alternatively + * a driver specific external lock by setting the @DRM_GPUVA_MANAGER_LOCK_EXTERN + * flag. + * + * For the latter, functions such as drm_gpuva_link() or drm_gpuva_unlink() + * contain lockdep checks to indicate locking issues. For this to work drivers + * must provide (in case the @DRM_GPUVA_MANAGER_LOCK_EXTERN flag is set) their + * external lock with drm_gpuva_manager_set_ext_lock() after initialization. + */ + +/** + * DOC: Examples + * + *...
2023 Jul 07
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...nge = range; > > mgr->name = name ? name : "unknown"; > - mgr->flags = flags; > mgr->ops = ops; > > memset(&mgr->kernel_alloc_node, 0, sizeof(struct drm_gpuva)); > @@ -822,16 +820,12 @@ EXPORT_SYMBOL(drm_gpuva_remove); > void > drm_gpuva_link(struct drm_gpuva *va) > { > - struct drm_gpuva_manager *mgr = va->mgr; > struct drm_gem_object *obj = va->gem.obj; > > if (unlikely(!obj)) > return; > > - if (drm_gpuva_manager_external_lock(mgr)) > - drm_gpuva_manager_ext_assert_held(mgr); > -...
2023 Jul 20
2
[PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings
...vely + * a driver specific external lock. For the latter see also + * drm_gem_gpuva_set_lock(). + * + * However, the GPU VA manager contains lockdep checks to ensure callers of its + * API hold the corresponding lock whenever the &drm_gem_objects GPU VA list is + * accessed by functions such as drm_gpuva_link() or drm_gpuva_unlink(). + */ + +/** + * DOC: Examples + * + * This section gives two examples on how to let the DRM GPUVA Manager generate + * &drm_gpuva_op in order to satisfy a given map or unmap request and how to + * make use of them. + * + * The below code is strictly limited to illustrat...