search for: drm_gpuva_insert

Displaying 10 results from an estimated 10 matches for "drm_gpuva_insert".

2023 Nov 08
1
[PATCH drm-misc-next v9 09/12] drm/gpuvm: reference count drm_gpuvm structures
...release the reference of + * + * This releases a reference to @gpuvm. + * + * This function may be called from atomic context. + */ +void +drm_gpuvm_put(struct drm_gpuvm *gpuvm) +{ + if (gpuvm) + kref_put(&gpuvm->kref, drm_gpuvm_free); +} +EXPORT_SYMBOL_GPL(drm_gpuvm_put); static int __drm_gpuva_insert(struct drm_gpuvm *gpuvm, @@ -839,11 +862,21 @@ drm_gpuva_insert(struct drm_gpuvm *gpuvm, { u64 addr = va->va.addr; u64 range = va->va.range; + int ret; if (unlikely(!drm_gpuvm_range_valid(gpuvm, addr, range))) return -EINVAL; - return __drm_gpuva_insert(gpuvm, va); + ret = __drm...
2023 Mar 06
0
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...>>>> +void >>>> +drm_gpuva_iter_remove(struct drm_gpuva_iterator *it) >>>> +{ >>>> + mas_erase(&it->mas); >>>> +} >>>> +EXPORT_SYMBOL(drm_gpuva_iter_remove); >>>> + >>>> +/** >>>> + * drm_gpuva_insert - insert a &drm_gpuva >>>> + * @mgr: the &drm_gpuva_manager to insert the &drm_gpuva in >>>> + * @va: the &drm_gpuva to insert >>>> + * @addr: the start address of the GPU VA >>>> + * @range: the range of the GPU VA >>>> +...
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...vers a way to + * iterate the &drm_gpuva_op multiple times, e.g. once in a context where memory + * allocations are possible (e.g. to allocate GPU page tables) and once in the + * dma-fence signalling critical path. + * + * To update the &drm_gpuva_manager's view of the GPU VA space + * drm_gpuva_insert() and drm_gpuva_remove() may be used. These functions can + * safely be used from &drm_gpuva_fn_ops callbacks originating from + * drm_gpuva_sm_map() or drm_gpuva_sm_unmap(). However, it might be more + * convenient to use the provided helper functions drm_gpuva_map(), + * drm_gpuva_remap() and...
2023 Feb 27
2
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...>>>> +void >>>> +drm_gpuva_iter_remove(struct drm_gpuva_iterator *it) >>>> +{ >>>> + mas_erase(&it->mas); >>>> +} >>>> +EXPORT_SYMBOL(drm_gpuva_iter_remove); >>>> + >>>> +/** >>>> + * drm_gpuva_insert - insert a &drm_gpuva >>>> + * @mgr: the &drm_gpuva_manager to insert the &drm_gpuva in >>>> + * @va: the &drm_gpuva to insert >>>> + * @addr: the start address of the GPU VA >>>> + * @range: the range of the GPU VA >>>> +...
2023 Jul 13
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...vers a way to + * iterate the &drm_gpuva_op multiple times, e.g. once in a context where memory + * allocations are possible (e.g. to allocate GPU page tables) and once in the + * dma-fence signalling critical path. + * + * To update the &drm_gpuva_manager's view of the GPU VA space + * drm_gpuva_insert() and drm_gpuva_remove() may be used. These functions can + * safely be used from &drm_gpuva_fn_ops callbacks originating from + * drm_gpuva_sm_map() or drm_gpuva_sm_unmap(). However, it might be more + * convenient to use the provided helper functions drm_gpuva_map(), + * drm_gpuva_remap() and...
2023 Jul 20
2
[PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings
...vers a way to + * iterate the &drm_gpuva_op multiple times, e.g. once in a context where memory + * allocations are possible (e.g. to allocate GPU page tables) and once in the + * dma-fence signalling critical path. + * + * To update the &drm_gpuva_manager's view of the GPU VA space + * drm_gpuva_insert() and drm_gpuva_remove() may be used. These functions can + * safely be used from &drm_gpuva_fn_ops callbacks originating from + * drm_gpuva_sm_map() or drm_gpuva_sm_unmap(). However, it might be more + * convenient to use the provided helper functions drm_gpuva_map(), + * drm_gpuva_remap() and...
2023 Mar 06
2
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...a_sm_map() and the drm mm range allocator with >>> DRM_MM_INSERT_LOW, and DRM_MM_INSERT_HIGH. >>> >>> Why can these split/unmappings fail? Is it because they are still >>> needed? >>> >> >> You mean the check before the mas_*() operations in drm_gpuva_insert()? > > Yes, the callbacks. > >> >> Removing entries should never fail, inserting entries should fail when the >> caller tries to store to an area outside of the VA space (it doesn't >> necessarily span the whole 64-bit space), a kernel reserved area of the VA...
2023 Aug 31
3
[PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation
...;>>> struct drm_gpuva_manager; >>>>>>> +struct drm_gpuva_gem; >>>>>>> struct drm_gpuva_fn_ops; >>>>>>> /** >>>>>>> @@ -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...
2023 Mar 13
1
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...gt;>> DRM_MM_INSERT_LOW, and DRM_MM_INSERT_HIGH. >>>>> >>>>> Why can these split/unmappings fail? Is it because they are still >>>>> needed? >>>>> >>>> >>>> You mean the check before the mas_*() operations in drm_gpuva_insert()? >>> >>> Yes, the callbacks. >>> >>>> >>>> Removing entries should never fail, inserting entries should fail when the >>>> caller tries to store to an area outside of the VA space (it doesn't >>>> necessarily span the...
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