search for: drm_gpuva_manager

Displaying 16 results from an estimated 16 matches for "drm_gpuva_manager".

2023 Aug 20
3
[PATCH drm-misc-next 0/3] [RFC] DRM GPUVA Manager GPU-VM features
...uch that drivers are free to make use of the DRM GPUVA managers basic functionality and opt-in for other features without setting any feature flags, just by making use of the corresponding functions. The implementation introduces struct drm_gpuva_gem, which serves as abstraction combining a struct drm_gpuva_manager and struct drm_gem_object, similar to what amdgpu does with struct amdgpu_bo_vm. While this adds a bit of complexity it improves the efficiency of tracking evicted GEM objects. [1] provides an alternative implementation using a maple_tree, resulting into a fairly simpler API. [2] points to the full...
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...ALINGS IN THE SOFTWARE. + * + * Authors: + * Danilo Krummrich <dakr at redhat.com> + * + */ + +#include <drm/drm_gpuva_mgr.h> + +#include <linux/interval_tree_generic.h> +#include <linux/mm.h> + +/** + * DOC: Overview + * + * The DRM GPU VA Manager, represented by struct drm_gpuva_manager keeps track + * of a GPU's virtual address (VA) space and manages the corresponding virtual + * mappings represented by &drm_gpuva objects. It also keeps track of the + * mapping's backing &drm_gem_object buffers. + * + * &drm_gem_object buffers maintain a list of &drm_gpuva...
2023 Jul 13
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...ALINGS IN THE SOFTWARE. + * + * Authors: + * Danilo Krummrich <dakr at redhat.com> + * + */ + +#include <drm/drm_gpuva_mgr.h> + +#include <linux/interval_tree_generic.h> +#include <linux/mm.h> + +/** + * DOC: Overview + * + * The DRM GPU VA Manager, represented by struct drm_gpuva_manager keeps track + * of a GPU's virtual address (VA) space and manages the corresponding virtual + * mappings represented by &drm_gpuva objects. It also keeps track of the + * mapping's backing &drm_gem_object buffers. + * + * &drm_gem_object buffers maintain a list of &drm_gpuva...
2023 Jul 20
2
[PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings
...ALINGS IN THE SOFTWARE. + * + * Authors: + * Danilo Krummrich <dakr at redhat.com> + * + */ + +#include <drm/drm_gpuva_mgr.h> + +#include <linux/interval_tree_generic.h> +#include <linux/mm.h> + +/** + * DOC: Overview + * + * The DRM GPU VA Manager, represented by struct drm_gpuva_manager keeps track + * of a GPU's virtual address (VA) space and manages the corresponding virtual + * mappings represented by &drm_gpuva objects. It also keeps track of the + * mapping's backing &drm_gem_object buffers. + * + * &drm_gem_object buffers maintain a list of &drm_gpuva...
2023 Jul 07
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...; Boris Brezillon <boris.brezillon at collabora.com> wrote: > >> On Fri, 30 Jun 2023 00:25:18 +0200 >> Danilo Krummrich <dakr at redhat.com> wrote: >> >>> +#ifdef CONFIG_LOCKDEP >>> +typedef struct lockdep_map *lockdep_map_p; >>> +#define drm_gpuva_manager_ext_assert_held(mgr) \ >>> + lockdep_assert(lock_is_held((mgr)->ext_lock) != LOCK_STATE_NOT_HELD) >>> +/** >>> + * drm_gpuva_manager_set_ext_lock - set the external lock according to >>> + * @DRM_GPUVA_MANAGER_LOCK_EXTERN >>> + * @mgr: the &drm_g...
2023 Jul 07
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...Jun 2023 00:25:18 +0200 > Danilo Krummrich <dakr at redhat.com> wrote: > >> +/** >> + * drm_gpuva_for_each_va_range - iternator to walk over a range of &drm_gpuvas >> + * @va__: &drm_gpuva structure to assign to in each iteration step >> + * @mgr__: &drm_gpuva_manager to walk over >> + * @start__: starting offset, the first gpuva will overlap this >> + * @end__: ending offset, the last gpuva will start before this (but may >> + * overlap) >> + * >> + * This iterator walks over all &drm_gpuvas in the &drm_gpuva_manager that l...
2023 Feb 27
2
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...a_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 >>>> + * >>>> + * Insert a &drm_gpuva with a given address and range in...
2023 Aug 31
3
[PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation
...>>>>>>> #include <linux/rbtree.h> >>>>>>> #include <linux/types.h> >>>>>>> #include <drm/drm_gem.h> >>>>>>> +#include <drm/drm_exec.h> >>>>>>> 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 *...
2023 Jul 20
1
[PATCH drm-misc-next v8 02/12] drm: debugfs: provide infrastructure to dump a DRM GPU VA space
...c_internal.h" #include "drm_internal.h" @@ -175,6 +176,45 @@ static const struct file_operations drm_debugfs_fops = { .release = single_release, }; +/** + * drm_debugfs_gpuva_info - dump the given DRM GPU VA space + * @m: pointer to the &seq_file to write + * @mgr: the &drm_gpuva_manager representing the GPU VA space + * + * Dumps the GPU VA mappings of a given DRM GPU VA manager. + * + * For each DRM GPU VA space drivers should call this function from their + * &drm_info_list's show callback. + * + * Returns: 0 on success, -ENODEV if the &mgr is not initialized + */ +i...
2023 Mar 06
2
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...;>>>> +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 >>>>>> + * >>>>>> + * Returns: the first &drm_gpuva within the given range >>>>>> + */ >>>&g...
2023 Mar 06
0
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...a_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 >>>> + * >>>> + * Insert a &drm_gpuva with a given address and range in...
2023 Feb 22
1
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
On 2/22/23 11:25, Christian K?nig wrote: > Am 17.02.23 um 14:44 schrieb Danilo Krummrich: <snip> >> +/** >> + * DOC: Overview >> + * >> + * The DRM GPU VA Manager, represented by struct drm_gpuva_manager >> keeps track >> + * of a GPU's virtual address (VA) space and manages the >> corresponding virtual >> + * mappings represented by &drm_gpuva objects. It also keeps track of >> the >> + * mapping's backing &drm_gem_object buffers. >> + *...
2023 Jun 23
1
[PATCH drm-next v5 03/14] drm: manager to keep track of GPUs VA mappings
...ecific BO and VM. Just to make it obvious for other people following the discussion, let me quickly sketch up how this approach would look like for the GPUVA manager: 1. We would need a new structure to represent the BO+VM combination, something like: struct drm_gpuva_mgr_gem { struct drm_gpuva_manager *mgr; struct drm_gem_object *obj; struct list_head gpuva_list; }; with a less horrible name, hopefully. 2. Create an instance of struct drm_gpuva_mgr_gem once a GEM becomes associated with a GPUVA manager (VM) and attach it to the GEMs, as by now, "gpuva" list. In amdgpu, for ex...
2023 Jul 06
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
Hi Donald, On 7/6/23 17:45, Donald Robson wrote: > On Fri, 2023-06-30 at 00:25 +0200, Danilo Krummrich wrote: >> >> +#ifdef CONFIG_LOCKDEP >> +typedef struct lockdep_map *lockdep_map_p; >> +#define drm_gpuva_manager_ext_assert_held(mgr) \ >> + lockdep_assert(lock_is_held((mgr)->ext_lock) != LOCK_STATE_NOT_HELD) >> +/** >> + * drm_gpuva_manager_set_ext_lock - set the external lock according to >> + * @DRM_GPUVA_MANAGER_LOCK_EXTERN >> + * @mgr: the &drm_gpuva_manager to set...
2023 Feb 23
1
[PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings
...>>>> Am 17.02.23 um 14:44 schrieb Danilo Krummrich: >>> >>> <snip> >>> >>>>> +/** >>>>> + * DOC: Overview >>>>> + * >>>>> + * The DRM GPU VA Manager, represented by struct >>>>> drm_gpuva_manager keeps track >>>>> + * of a GPU's virtual address (VA) space and manages the >>>>> corresponding virtual >>>>> + * mappings represented by &drm_gpuva objects. It also keeps >>>>> track of the >>>>> + * mapping's...
2023 Jun 23
1
[PATCH drm-next v5 03/14] drm: manager to keep track of GPUs VA mappings
Am 22.06.23 um 17:07 schrieb Danilo Krummrich: > On 6/22/23 17:04, Danilo Krummrich wrote: >> On 6/22/23 16:42, Christian K?nig wrote: >>> Am 22.06.23 um 16:22 schrieb Danilo Krummrich: >>>> On 6/22/23 15:54, Christian K?nig wrote: >>>>> Am 20.06.23 um 14:23 schrieb Danilo Krummrich: >>>>>> Hi Christian, >>>>>>