search for: drm_gpuva_unlink

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

Did you mean: drm_gpuva_link
2023 Aug 31
3
[PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation
...*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 *mgr, >>>>>>> @@ -240,15 +244,137 @@ struct drm_gpuva_manager { >>>>>>> * @ops: &drm_gpuva_fn_ops providing the split/merge steps t...
2023 Jul 17
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...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 Jul 13
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...ject 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 + * + * This section gives tw...
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...ject 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 + * + * This section gives tw...
2023 Jul 20
2
[PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings
...ecific 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 illustrate the generic usage pa...
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 06
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...;dakr at redhat.com> wrote: > >> + * int driver_gpuva_remap(struct drm_gpuva_op *op, void *__ctx) >> + * { >> + * struct driver_context *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 lo...
2023 Jul 07
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...puva_manager_ext_assert_held(mgr); > - else > - dma_resv_assert_held(obj->resv); > + drm_gem_gpuva_assert_lock_held(obj); > > list_add_tail(&va->gem.entry, &obj->gpuva.list); > } > @@ -850,16 +844,12 @@ EXPORT_SYMBOL(drm_gpuva_link); > void > drm_gpuva_unlink(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); > -...