KFD upstreaming Nov 2018, part 2
Subsystems (3)
cover KFD upstreaming Nov 2018, part 2
This round adds support for more ROCm memory manager features:
* VRAM limit checking to avoid overcommitment
* DMABuf import for graphics interoperability
* Support for mapping doorbells into GPUVM address space
Felix Kuehling (4):
drm/amdgpu: Add KFD VRAM limit checking
drm/amdkfd: Add NULL-pointer check
drm/amdkfd: Add DMABuf import functionality
drm/amdkfd: Add support for doorbell BOs
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 109 ++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 19 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 170 ++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 124 ++++++++++++++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 20 ++- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 4 +- include/uapi/linux/kfd_ioctl.h | 26 +++- 12 files changed, 423 insertions(+), 65 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1542769636-2976-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org
PATCH 1/4 drm/amdgpu: Add KFD VRAM limit checking
We don't want KFD processes evicting each other over VRAM usage. Therefore prevent overcommitting VRAM among KFD applications with a per-GPU limit. Also leave enough room for page tables on top of the application memory usage.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 52 ++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 8 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 60 ++++++++++++------------ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 5 files changed, 75 insertions(+), 54 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +4 -3
@@ -81,6 +81,7 @@#include "amdgpu_job.h" #include "amdgpu_bo_list.h" #include "amdgpu_gem.h" +#include "amdgpu_amdkfd.h" #define MAX_GPU_INSTANCE 16
@@ -979,6 +980,9 @@ struct amdgpu_device {/* GDS */ struct amdgpu_gds gds; +/* KFD */ +struct amdgpu_kfd_dev kfd; +/* display related functionality */ struct amdgpu_display_manager dm;
@@ -992,9 +996,6 @@ struct amdgpu_device {atomic64_t visible_pin_size;atomic64_t gart_pin_size; -/* amdkfd interface */ -struct kfd_dev *kfd; -/* soc15 register offset based on ip, instance and segment */ uint32_t *reg_offset[MAX_HWIP ][HWIP_MAX_INSTANCE ];
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +33 -19
125 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +7 -1
@@ -35,6 +35,7 @@#include "amdgpu_vm.h" extern const struct kgd2kfd_calls *kgd2kfd; +extern uint64_t amdgpu_amdkfd_total_mem_size;struct amdgpu_device ;
@@ -77,6 +78,11 @@ struct amdgpu_amdkfd_fence {char timeline_name[TASK_COMM_LEN ]; }; +struct amdgpu_kfd_dev { +struct kfd_dev *dev; +uint64_t vram_used; +}; +struct amdgpu_amdkfd_fence *amdgpu_amdkfd_fence_create (u64 context,struct mm_struct *mm);bool amdkfd_fence_check_mm (struct dma_fence *f,struct mm_struct *mm);
@@ -196,6 +202,6 @@ int amdgpu_amdkfd_gpuvm_get_vm_fault_info(struct kgd_dev *kgd, struct kfd_vm_fault_info *info);void amdgpu_amdkfd_gpuvm_init_mem_limits (void ); -void amdgpu_amdkfd_unreserve_system_memory_limit (struct amdgpu_bo *bo); +void amdgpu_amdkfd_unreserve_memory_limit (struct amdgpu_bo *bo);#endif /* AMDGPU_AMDKFD_H_INCLUDED */
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +30 -30
120 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -1
@@ -81,7 +81,7 @@ static void amdgpu_bo_destroy(struct ttm_buffer_object *tbo)amdgpu_bo_subtract_pin_size (bo);if (bo->kfd_bo) -amdgpu_amdkfd_unreserve_system_memory_limit (bo); +amdgpu_amdkfd_unreserve_memory_limit (bo);amdgpu_bo_kunmap (bo);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/4 drm/amdkfd: Add NULL-pointer check
In reply to a message not in the archivetop_dev->gpu is NULL for CPUs. Avoid dereferencing it if NULL.
--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +1 -1
@@ -101,7 +101,7 @@ struct kfd_dev *kfd_device_by_pci_dev(const struct pci_dev *pdev)down_read (&topology_lock);list_for_each_entry (top_dev, &topology_device_list, list) -if (top_dev->gpu->pdev == pdev) { +if (top_dev->gpu && top_dev->gpu->pdev == pdev) { device = top_dev->gpu;break ; }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 drm/amdkfd: Add DMABuf import functionality
In reply to a message not in the archiveThis is used for interoperability between ROCm compute and graphics APIs. It allows importing graphics driver BOs into the ROCm SVM address space for zero-copy GPU access.
The API is split into two steps (query and import) to allow user mode to manage the virtual address space allocation for the imported buffer.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 57 +++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 11 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 55 +++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 118 ++++++++++++++++++++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 18 ++++ include/uapi/linux/kfd_ioctl.h | 26 ++++- 9 files changed, 287 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +57 -0
@@ -26,6 +26,7 @@#include "amdgpu.h" #include "amdgpu_gfx.h" #include <linux/module.h> +#include <linux/dma-buf.h> const struct kgd2kfd_calls *kgd2kfd;
@@ -444,6 +445,62 @@ void amdgpu_amdkfd_get_cu_info(struct kgd_dev *kgd, struct kfd_cu_info *cu_info) cu_info->lds_size = acu_info.lds_size; } +int amdgpu_amdkfd_get_dmabuf_info (struct kgd_dev *kgd,int dma_buf_fd, +struct kgd_dev **dma_buf_kgd, +uint64_t *bo_size,void *metadata_buffer, +size_t buffer_size,uint32_t *metadata_size, +uint32_t *flags) +{ +struct amdgpu_device *adev = (struct amdgpu_device *)kgd; +struct dma_buf *dma_buf; +struct drm_gem_object *obj; +struct amdgpu_bo *bo; +uint64_t metadata_flags; +int r = -EINVAL ; + + dma_buf =dma_buf_get (dma_buf_fd); +if (IS_ERR (dma_buf)) +return PTR_ERR (dma_buf); + +if (dma_buf->ops != &amdgpu_dmabuf_ops) +/* Can't handle non-graphics buffers */ + goto out_put; + + obj = dma_buf->priv; +if (obj->dev->driver != adev->ddev->driver) +/* Can't handle buffers from different drivers */ + goto out_put; + + adev = obj->dev->dev_private; + bo =gem_to_amdgpu_bo (obj); +if (!(bo->preferred_domains & (AMDGPU_GEM_DOMAIN_VRAM | +AMDGPU_GEM_DOMAIN_GTT ))) +/* Only VRAM and GTT BOs are supported */ + goto out_put; + + r =0 ; +if (dma_buf_kgd) + *dma_buf_kgd = (struct kgd_dev *)adev; +if (bo_size) + *bo_size =amdgpu_bo_size (bo); +if (metadata_size) + *metadata_size = bo->metadata_size; +if (metadata_buffer) + r =amdgpu_bo_get_metadata (bo, metadata_buffer, buffer_size, + metadata_size, &metadata_flags); +if (flags) { + *flags = (bo->preferred_domains &AMDGPU_GEM_DOMAIN_VRAM ) ? +ALLOC_MEM_FLAGS_VRAM :ALLOC_MEM_FLAGS_GTT ; + +if (bo->flags &AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED ) + *flags |=ALLOC_MEM_FLAGS_PUBLIC ; + } + +out_put: +dma_buf_put (dma_buf); +return r; +} +uint64_t amdgpu_amdkfd_get_vram_usage (struct kgd_dev *kgd) {struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +11 -0
@@ -150,6 +150,11 @@ uint64_t amdgpu_amdkfd_get_gpu_clock_counter(struct kgd_dev *kgd);uint32_t amdgpu_amdkfd_get_max_engine_clock_in_mhz (struct kgd_dev *kgd);void amdgpu_amdkfd_get_cu_info (struct kgd_dev *kgd,struct kfd_cu_info *cu_info); +int amdgpu_amdkfd_get_dmabuf_info (struct kgd_dev *kgd,int dma_buf_fd, +struct kgd_dev **dmabuf_kgd, +uint64_t *bo_size,void *metadata_buffer, +size_t buffer_size,uint32_t *metadata_size, +uint32_t *flags);uint64_t amdgpu_amdkfd_get_vram_usage (struct kgd_dev *kgd);uint64_t amdgpu_amdkfd_get_hive_id (struct kgd_dev *kgd);
@@ -201,6 +206,12 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *process_info,int amdgpu_amdkfd_gpuvm_get_vm_fault_info (struct kgd_dev *kgd,struct kfd_vm_fault_info *info); +int amdgpu_amdkfd_gpuvm_import_dmabuf (struct kgd_dev *kgd, +struct dma_buf *dmabuf, +uint64_t va,void *vm, +struct kgd_mem **mem,uint64_t *size, +uint64_t *mmap_offset); +void amdgpu_amdkfd_gpuvm_init_mem_limits (void );void amdgpu_amdkfd_unreserve_memory_limit (struct amdgpu_bo *bo);
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +55 -0
67 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h +2 -0
@@ -54,6 +54,8 @@ void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj);void amdgpu_gem_prime_vunmap (struct drm_gem_object *obj,void *vaddr);int amdgpu_gem_prime_mmap (struct drm_gem_object *obj,struct vm_area_struct *vma); +extern const struct dma_buf_ops amdgpu_dmabuf_ops; +/* * GEM objects. */
drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +1 -3
@@ -39,8 +39,6 @@#include <drm/amdgpu_drm.h> #include <linux/dma-buf.h> -static const struct dma_buf_ops amdgpu_dmabuf_ops; -/** * amdgpu_gem_prime_get_sg_table - &drm_driver.gem_prime_get_sg_table * implementation
@@ -332,7 +330,7 @@ static int amdgpu_gem_begin_cpu_access(struct dma_buf *dma_buf,return ret; } -static const struct dma_buf_ops amdgpu_dmabuf_ops = { +const struct dma_buf_ops amdgpu_dmabuf_ops = { .attach = amdgpu_gem_map_attach, .detach = amdgpu_gem_map_detach, .map_dma_buf = drm_gem_map_dma_buf,
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +117 -1
136 lines not on this page · raw message
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 -0
@@ -793,6 +793,7 @@ struct kfd_topology_device *kfd_topology_device_by_proximity_domain(struct kfd_topology_device *kfd_topology_device_by_id (uint32_t gpu_id);struct kfd_dev *kfd_device_by_id (uint32_t gpu_id);struct kfd_dev *kfd_device_by_pci_dev (const struct pci_dev *pdev); +struct kfd_dev *kfd_device_by_kgd (const struct kgd_dev *kgd);int kfd_topology_enum_kfd_devices (uint8_t idx,struct kfd_dev **kdev);int kfd_numa_node_to_apic_id (int numa_node_id);
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +18 -0
@@ -111,6 +111,24 @@ struct kfd_dev *kfd_device_by_pci_dev(const struct pci_dev *pdev)return device; } +struct kfd_dev *kfd_device_by_kgd (const struct kgd_dev *kgd) +{ +struct kfd_topology_device *top_dev; +struct kfd_dev *device =NULL ; + +down_read (&topology_lock); + +list_for_each_entry (top_dev, &topology_device_list, list) +if (top_dev->gpu && top_dev->gpu->kgd == kgd) { + device = top_dev->gpu; +break ; + } + +up_read (&topology_lock); + +return device; +} +/* Called with write topology_lock acquired */ static void kfd_release_topology_device (struct kfd_topology_device *dev) {
include/uapi/linux/kfd_ioctl.h +25 -1
@@ -398,6 +398,24 @@ struct kfd_ioctl_unmap_memory_from_gpu_args {__u32 n_success;/* to/from KFD */ }; +struct kfd_ioctl_get_dmabuf_info_args { +__u64 size;/* from KFD */ +__u64 metadata_ptr;/* to KFD */ +__u32 metadata_size;/* to KFD (space allocated by user) +* from KFD (actual metadata size) +*/ +__u32 gpu_id;/* from KFD */ +__u32 flags;/* from KFD (KFD_IOC_ALLOC_MEM_FLAGS) */ +__u32 dmabuf_fd;/* to KFD */ +}; + +struct kfd_ioctl_import_dmabuf_args { +__u64 va_addr;/* to KFD */ +__u64 handle;/* from KFD */ +__u32 gpu_id;/* to KFD */ +__u32 dmabuf_fd;/* to KFD */ +}; +#define AMDKFD_IOCTL_BASE 'K'#define AMDKFD_IO (nr) _IO(AMDKFD_IOCTL_BASE, nr)#define AMDKFD_IOR (nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
@@ -486,7 +504,13 @@ struct kfd_ioctl_unmap_memory_from_gpu_args {#define AMDKFD_IOC_GET_QUEUE_WAVE_STATE \ AMDKFD_IOWR(0x1B, struct kfd_ioctl_get_queue_wave_state_args) +#define AMDKFD_IOC_GET_DMABUF_INFO \ + AMDKFD_IOWR(0x1C, struct kfd_ioctl_get_dmabuf_info_args) + +#define AMDKFD_IOC_IMPORT_DMABUF \ + AMDKFD_IOWR(0x1D, struct kfd_ioctl_import_dmabuf_args) +#define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x1C +#define AMDKFD_COMMAND_END 0x1E#endif
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 drm/amdkfd: Add support for doorbell BOs
In reply to a message not in the archiveThis allows user mode to map doorbell pages into GPUVM address space. That way GPUs can submit to user mode queues (self-dispatch).
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 59 ++++++++++++++++++++++-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 +++ drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 4 +- 3 files changed, 62 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +54 -5
@@ -887,6 +887,24 @@ static int map_bo_to_gpuvm(struct amdgpu_device *adev,return ret; } +static struct sg_table *create_doorbell_sg (uint64_t addr,uint32_t size) +{ +struct sg_table *sg =kmalloc (sizeof (*sg),GFP_KERNEL ); + +if (!sg) +return NULL ; +if (sg_alloc_table (sg,1 ,GFP_KERNEL )) { +kfree (sg); +return NULL ; + } + sg->sgl->dma_address = addr; + sg->sgl->length = size; +#ifdef CONFIG_NEED_SG_DMA_LENGTH + sg->sgl->dma_length = size; +#endif +return sg; +} +static int process_validate_vms (struct amdkfd_process_info *process_info) {struct amdgpu_vm *peer_vm;
@@ -1170,6 +1188,8 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu( {struct amdgpu_device *adev =get_amdgpu_device (kgd);struct amdgpu_vm *avm = (struct amdgpu_vm *)vm; +enum ttm_bo_type bo_type = ttm_bo_type_device; +struct sg_table *sg =NULL ;uint64_t user_addr =0 ;struct amdgpu_bo *bo;struct amdgpu_bo_param bp;
@@ -1198,13 +1218,25 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(if (!offset || !*offset)return -EINVAL ; user_addr = *offset; + }else if (flags &ALLOC_MEM_FLAGS_DOORBELL ) { + domain =AMDGPU_GEM_DOMAIN_GTT ; + alloc_domain =AMDGPU_GEM_DOMAIN_CPU ; + bo_type = ttm_bo_type_sg; + alloc_flags =0 ; +if (size >UINT_MAX ) +return -EINVAL ; + sg =create_doorbell_sg (*offset, size); +if (!sg) +return -ENOMEM ; }else {return -EINVAL ; } *mem =kzalloc (sizeof (struct kgd_mem ),GFP_KERNEL ); -if (!*mem) -return -ENOMEM ; +if (!*mem) { + ret = -ENOMEM ; + goto err; + }INIT_LIST_HEAD (&(*mem)->bo_va_list);mutex_init (&(*mem)->lock); (*mem)->aql_queue = !!(flags &ALLOC_MEM_FLAGS_AQL_QUEUE_MEM );
@@ -1237,7 +1269,7 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(amdgpu_sync_create (&(*mem)->sync); - ret =amdgpu_amdkfd_reserve_mem_limit (adev, size, alloc_domain, false); + ret =amdgpu_amdkfd_reserve_mem_limit (adev, size, alloc_domain, !!sg);if (ret) {pr_debug ("Insufficient system memory\n" ); goto err_reserve_limit;
@@ -1251,7 +1283,7 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu( bp.byte_align = byte_align; bp.domain = alloc_domain; bp.flags = alloc_flags; - bp.type = ttm_bo_type_device; + bp.type = bo_type; bp.resv =NULL ; ret =amdgpu_bo_create (adev, &bp, &bo);if (ret) {
@@ -1259,6 +1291,10 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu( domain_string(alloc_domain), ret); goto err_bo_create; } +if (bo_type == ttm_bo_type_sg) { + bo->tbo.sg = sg; + bo->tbo.ttm->sg = sg; + } bo->kfd_bo = *mem; (*mem)->bo = bo;if (user_addr)
@@ -1290,10 +1326,15 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(/* Don't unreserve system mem limit twice */ goto err_reserve_limit; err_bo_create: -unreserve_mem_limit (adev, size, alloc_domain, false); +unreserve_mem_limit (adev, size, alloc_domain, !!sg); err_reserve_limit:mutex_destroy (&(*mem)->lock);kfree (*mem); +err: +if (sg) { +sg_free_table (sg); +kfree (sg); + }return ret; }
@@ -1363,6 +1404,14 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(/* Free the sync object */ amdgpu_sync_free (&mem->sync); +/* If the SG is not NULL, it's one we created for a doorbell +* BO. We need to free it. +*/ +if (mem->bo->tbo.sg) { +sg_free_table (mem->bo->tbo.sg); +kfree (mem->bo->tbo.sg); + } +/* Free the BO*/ amdgpu_bo_unref (&mem->bo);mutex_destroy (&mem->lock);
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +6 -0
@@ -1274,6 +1274,12 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep,return -EINVAL ; } +if (flags &KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL ) { +if (args->size !=kfd_doorbell_process_slice (dev)) +return -EINVAL ; + offset =kfd_get_process_doorbells (dev, p); + } +mutex_lock (&p->mutex); pdd =kfd_bind_process_to_device (dev, p);
drivers/gpu/drm/amd/include/kgd_kfd_interface.h +2 -2
@@ -188,8 +188,8 @@ struct tile_config {*/ #define ALLOC_MEM_FLAGS_VRAM (1 << 0)#define ALLOC_MEM_FLAGS_GTT (1 << 1) -#define ALLOC_MEM_FLAGS_USERPTR (1 << 2)/* TODO */ -#define ALLOC_MEM_FLAGS_DOORBELL (1 << 3)/* TODO */ +#define ALLOC_MEM_FLAGS_USERPTR (1 << 2) +#define ALLOC_MEM_FLAGS_DOORBELL (1 << 3)/* * Allocation flags attributes/access options.
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Ping. Any comments, R-b, A-b?
Quoted 11 lines · Felix
This round adds support for more ROCm memory manager features:
* VRAM limit checking to avoid overcommitment
* DMABuf import for graphics interoperability
* Support for mapping doorbells into GPUVM address spaceFelix Kuehling (4):
drm/amdgpu: Add KFD VRAM limit checking
drm/amdkfd: Add NULL-pointer check
drm/amdkfd: Add DMABuf import functionality
drm/amdkfd: Add support for doorbell BOs
Quoted 14 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 109 ++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 19 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 170 ++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 124 ++++++++++++++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 20 ++- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 4 +- include/uapi/linux/kfd_ioctl.h | 26 +++- 12 files changed, 423 insertions(+), 65 deletions(-)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): f866486f-991d-466d-6594-9e16a8526b71-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Acked-byFor the series:
Quoted 29 lines · Felix
Ping. Any comments, R-b, A-b?
Quoted 11 lines · Felix
This round adds support for more ROCm memory manager features:
* VRAM limit checking to avoid overcommitment
* DMABuf import for graphics interoperability
* Support for mapping doorbells into GPUVM address spaceFelix Kuehling (4):
drm/amdgpu: Add KFD VRAM limit checking
drm/amdkfd: Add NULL-pointer check
drm/amdkfd: Add DMABuf import functionality
drm/amdkfd: Add support for doorbell BOsQuoted 14 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 109 ++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 19 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 170 ++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 124 ++++++++++++++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 20 ++- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 4 +- include/uapi/linux/kfd_ioctl.h | 26 +++- 12 files changed, 423 insertions(+), 65 deletions(-)
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx