search for: drm_gpuva_find_first

Displaying 7 results from an estimated 7 matches for "drm_gpuva_find_first".

2023 Jul 07
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...t @end__ is within (or is the upper limit of) the >> + * &drm_gpuva_manager. This iterator does not skip over the &drm_gpuva_manager's >> + * @kernel_alloc_node. >> + */ >> +#define drm_gpuva_for_each_va_range(va__, mgr__, start__, end__) \ >> + for (va__ = drm_gpuva_find_first((mgr__), (start__), (end__)); \ > > drm_gpuva_find_first() takes the range size as its last argument, not > the range end: > > for (va__ = drm_gpuva_find_first((mgr__), (start__), (end__) - (start__)); \ > Good catch! Originally this was drm_gpuva_it_iter_first(&(mgr)-&g...
2023 Feb 27
2
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...flags & DRM_GPUVA_MANAGER_REGIONS) { >>>> + reg = drm_gpuva_in_region(mgr, addr, range); >>>> + if (unlikely(!reg)) >>>> + return -EINVAL; >>>> + } >>>> + >>> >>> ----- >>> >>>> + if (unlikely(drm_gpuva_find_first(mgr, addr, range))) >>>> + return -EEXIST; >>>> + >>>> + ret = mas_store_gfp(&mas, va, GFP_KERNEL); >>> >>> mas_walk() will set the internal maple state to the limits to what it >>> finds. So, instead of an iterator, you can use t...
2023 Mar 06
2
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
..., 0); >>>>>> + >>>>>> + mas_erase(&mas); >>>>>> +} >>>>>> +EXPORT_SYMBOL(drm_gpuva_remove); >>>>>> + >>>>> ... >>>>> >>>>>> +/** >>>>>> + * drm_gpuva_find_first - find the first &drm_gpuva in the given range >>>>>> + * @mgr: the &drm_gpuva_manager to search in >>>>>> + * @addr: the &drm_gpuvas address >>>>>> + * @range: the &drm_gpuvas range >>>>>> + * >>>>&...
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...t 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); + else + dma_resv_assert_held(obj->resv); + + list_del_init(&va->gem.entry); +} +EXPORT_SYMBOL(drm_gpuva_unlink); + +/** + * drm_gpuva_find_first - find the first &drm_gpuva in the given range + * @mgr: the &drm_gpuva_manager to search in + * @addr: the &drm_gpuvas address + * @range: the &drm_gpuvas range + * + * Returns: the first &drm_gpuva within the given range + */ +struct drm_gpuva * +drm_gpuva_find_first(struct dr...
2023 Jul 13
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...sing the GEMs dma_resv lock. + */ +void +drm_gpuva_unlink(struct drm_gpuva *va) +{ + struct drm_gem_object *obj = va->gem.obj; + + if (unlikely(!obj)) + return; + + drm_gem_gpuva_assert_lock_held(obj); + + list_del_init(&va->gem.entry); +} +EXPORT_SYMBOL_GPL(drm_gpuva_unlink); + +/** + * drm_gpuva_find_first() - find the first &drm_gpuva in the given range + * @mgr: the &drm_gpuva_manager to search in + * @addr: the &drm_gpuvas address + * @range: the &drm_gpuvas range + * + * Returns: the first &drm_gpuva within the given range + */ +struct drm_gpuva * +drm_gpuva_find_first(struct...
2023 Jul 20
2
[PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings
...sing the GEMs dma_resv lock. + */ +void +drm_gpuva_unlink(struct drm_gpuva *va) +{ + struct drm_gem_object *obj = va->gem.obj; + + if (unlikely(!obj)) + return; + + drm_gem_gpuva_assert_lock_held(obj); + + list_del_init(&va->gem.entry); +} +EXPORT_SYMBOL_GPL(drm_gpuva_unlink); + +/** + * drm_gpuva_find_first() - find the first &drm_gpuva in the given range + * @mgr: the &drm_gpuva_manager to search in + * @addr: the &drm_gpuvas address + * @range: the &drm_gpuvas range + * + * Returns: the first &drm_gpuva within the given range + */ +struct drm_gpuva * +drm_gpuva_find_first(struct...
2023 Mar 06
0
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...flags & DRM_GPUVA_MANAGER_REGIONS) { >>>> + reg = drm_gpuva_in_region(mgr, addr, range); >>>> + if (unlikely(!reg)) >>>> + return -EINVAL; >>>> + } >>>> + >>> >>> ----- >>> >>>> + if (unlikely(drm_gpuva_find_first(mgr, addr, range))) >>>> + return -EEXIST; >>>> + >>>> + ret = mas_store_gfp(&mas, va, GFP_KERNEL); >>> >>> mas_walk() will set the internal maple state to the limits to what it >>> finds. So, instead of an iterator, you can use t...