drm/amdkfd: Add gpu reset interface and place holder
authorShaoyun Liu <Shaoyun.Liu@amd.com>
Thu, 12 Jul 2018 02:32:54 +0000 (22:32 -0400)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 12 Jul 2018 02:32:54 +0000 (22:32 -0400)
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
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>
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_module.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h

index 6007511757606d1b25c357d06481f344a2bebfaf..a8226d8b86cc05790bfd7c19fa4d1ed161dc0ac4 100644 (file)
@@ -514,6 +514,16 @@ void kgd2kfd_device_exit(struct kfd_dev *kfd)
        kfree(kfd);
 }
 
+int kgd2kfd_pre_reset(struct kfd_dev *kfd)
+{
+       return 0;
+}
+
+int kgd2kfd_post_reset(struct kfd_dev *kfd)
+{
+       return 0;
+}
+
 void kgd2kfd_suspend(struct kfd_dev *kfd)
 {
        if (!kfd->init_complete)
index 76bf2dc8aec4398afcf5b5835650e445b528cabe..ee7bf07db4723d4f84f39b085cfaf844c3118325 100644 (file)
@@ -47,6 +47,8 @@ static const struct kgd2kfd_calls kgd2kfd = {
        .resume_mm      = kgd2kfd_resume_mm,
        .schedule_evict_and_restore_process =
                          kgd2kfd_schedule_evict_and_restore_process,
+       .pre_reset      = kgd2kfd_pre_reset,
+       .post_reset     = kgd2kfd_post_reset,
 };
 
 int sched_policy = KFD_SCHED_POLICY_HWS;
index cd5121d925e048f534d0015665b1cbe64c4dbfca..4bc8d5af419de52ea9e3213838f0c9f0acc7df08 100644 (file)
@@ -815,6 +815,10 @@ bool interrupt_is_wanted(struct kfd_dev *dev,
 void kgd2kfd_suspend(struct kfd_dev *kfd);
 int kgd2kfd_resume(struct kfd_dev *kfd);
 
+/* GPU reset */
+int kgd2kfd_pre_reset(struct kfd_dev *kfd);
+int kgd2kfd_post_reset(struct kfd_dev *kfd);
+
 /* amdkfd Apertures */
 int kfd_init_apertures(struct kfd_process *process);