Message ID | 20210510163625.407105-5-andrey.grodzovsky@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | RFC Support hot device unplug in amdgpu | expand |
Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: > Helps to expdite HW related stuff to amdgpu_pci_remove > > Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- > drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++- > 3 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c > index 5f6696a3c778..2b06dee9a0ce 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c > @@ -170,7 +170,7 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev) > } > } > > -void amdgpu_amdkfd_device_fini(struct amdgpu_device *adev) > +void amdgpu_amdkfd_device_fini_sw(struct amdgpu_device *adev) > { > if (adev->kfd.dev) { > kgd2kfd_device_exit(adev->kfd.dev); > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h > index 14f68c028126..f8e10af99c28 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h > @@ -127,7 +127,7 @@ void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev, > const void *ih_ring_entry); > void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev); > void amdgpu_amdkfd_device_init(struct amdgpu_device *adev); > -void amdgpu_amdkfd_device_fini(struct amdgpu_device *adev); > +void amdgpu_amdkfd_device_fini_sw(struct amdgpu_device *adev); > int amdgpu_amdkfd_submit_ib(struct kgd_dev *kgd, enum kgd_engine_type engine, > uint32_t vmid, uint64_t gpu_addr, > uint32_t *ib_cmd, uint32_t ib_len); > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > index 357b9bf62a1c..ab6d2a43c9a3 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > @@ -858,10 +858,11 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, > return kfd->init_complete; > } > > + > + Looks like unnecessary white space change to me. > void kgd2kfd_device_exit(struct kfd_dev *kfd) > { > if (kfd->init_complete) { > - kgd2kfd_suspend(kfd, false); Where is the call to this function now? Christian. > device_queue_manager_uninit(kfd->dqm); > kfd_interrupt_exit(kfd); > kfd_topology_remove_device(kfd);
[AMD Public Use] Typo in the subject: devie > device Alex
On 2021-05-11 2:40 a.m., Christian König wrote: > Am 10.05.21 um 18:36 schrieb Andrey Grodzovsky: >> Helps to expdite HW related stuff to amdgpu_pci_remove >> >> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- >> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++- >> 3 files changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c >> index 5f6696a3c778..2b06dee9a0ce 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c >> @@ -170,7 +170,7 @@ void amdgpu_amdkfd_device_init(struct >> amdgpu_device *adev) >> } >> } >> -void amdgpu_amdkfd_device_fini(struct amdgpu_device *adev) >> +void amdgpu_amdkfd_device_fini_sw(struct amdgpu_device *adev) >> { >> if (adev->kfd.dev) { >> kgd2kfd_device_exit(adev->kfd.dev); >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h >> index 14f68c028126..f8e10af99c28 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h >> @@ -127,7 +127,7 @@ void amdgpu_amdkfd_interrupt(struct amdgpu_device >> *adev, >> const void *ih_ring_entry); >> void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev); >> void amdgpu_amdkfd_device_init(struct amdgpu_device *adev); >> -void amdgpu_amdkfd_device_fini(struct amdgpu_device *adev); >> +void amdgpu_amdkfd_device_fini_sw(struct amdgpu_device *adev); >> int amdgpu_amdkfd_submit_ib(struct kgd_dev *kgd, enum >> kgd_engine_type engine, >> uint32_t vmid, uint64_t gpu_addr, >> uint32_t *ib_cmd, uint32_t ib_len); >> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c >> b/drivers/gpu/drm/amd/amdkfd/kfd_device.c >> index 357b9bf62a1c..ab6d2a43c9a3 100644 >> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c >> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c >> @@ -858,10 +858,11 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, >> return kfd->init_complete; >> } >> + >> + > > Looks like unnecessary white space change to me. > >> void kgd2kfd_device_exit(struct kfd_dev *kfd) >> { >> if (kfd->init_complete) { >> - kgd2kfd_suspend(kfd, false); > > Where is the call to this function now? > > Christian. In patch 'drm/amdgpu: Add early fini callback' in amdgpu_device_ip_fini_early->amdgpu_amdkfd_suspend->kgd2kfd_suspend Andrey > >> device_queue_manager_uninit(kfd->dqm); >> kfd_interrupt_exit(kfd); >> kfd_topology_remove_device(kfd); >
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 5f6696a3c778..2b06dee9a0ce 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -170,7 +170,7 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev) } } -void amdgpu_amdkfd_device_fini(struct amdgpu_device *adev) +void amdgpu_amdkfd_device_fini_sw(struct amdgpu_device *adev) { if (adev->kfd.dev) { kgd2kfd_device_exit(adev->kfd.dev); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h index 14f68c028126..f8e10af99c28 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h @@ -127,7 +127,7 @@ void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev, const void *ih_ring_entry); void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev); void amdgpu_amdkfd_device_init(struct amdgpu_device *adev); -void amdgpu_amdkfd_device_fini(struct amdgpu_device *adev); +void amdgpu_amdkfd_device_fini_sw(struct amdgpu_device *adev); int amdgpu_amdkfd_submit_ib(struct kgd_dev *kgd, enum kgd_engine_type engine, uint32_t vmid, uint64_t gpu_addr, uint32_t *ib_cmd, uint32_t ib_len); diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 357b9bf62a1c..ab6d2a43c9a3 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -858,10 +858,11 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, return kfd->init_complete; } + + void kgd2kfd_device_exit(struct kfd_dev *kfd) { if (kfd->init_complete) { - kgd2kfd_suspend(kfd, false); device_queue_manager_uninit(kfd->dqm); kfd_interrupt_exit(kfd); kfd_topology_remove_device(kfd);
Helps to expdite HW related stuff to amdgpu_pci_remove Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-)