diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2018-03-16 00:27:44 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2018-03-16 00:27:44 +0300 |
commit | b84394e206a748ce34beeed462f237474f3c6c00 (patch) | |
tree | ab401e80596304c17702b6007077054ae85abee7 /drivers/gpu/drm/amd/amdkfd/kfd_priv.h | |
parent | ede0dd86f45adf2b7083bb161f6bc81da5fe2bad (diff) | |
download | linux-b84394e206a748ce34beeed462f237474f3c6c00.tar.xz |
drm/amdkfd: Create KFD VMs on demand
Instead of creating all VMs on process creation, create them when
a process is bound to a device. This will later allow registering
an existing VM from a DRM render node FD at runtime, before the
process is bound to the device. This way the render node VM can be
used for KFD instead of creating our own redundant VM.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_priv.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index cac7aa258162..014d608226d5 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h @@ -536,6 +536,7 @@ struct kfd_process_device { uint64_t scratch_limit; /* VM context for GPUVM allocations */ + struct file *drm_file; void *vm; /* Flag used to tell the pdd has dequeued from the dqm. @@ -661,6 +662,8 @@ void kfd_unref_process(struct kfd_process *p); void kfd_suspend_all_processes(void); int kfd_resume_all_processes(void); +int kfd_process_device_init_vm(struct kfd_process_device *pdd, + struct file *drm_file); struct kfd_process_device *kfd_bind_process_to_device(struct kfd_dev *dev, struct kfd_process *p); struct kfd_process_device *kfd_get_process_device_data(struct kfd_dev *dev, |