aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/include
diff options
context:
space:
mode:
authorShaoyun Liu <Shaoyun.Liu@amd.com>2018-07-11 22:32:52 -0400
committerOded Gabbay <oded.gabbay@gmail.com>2018-07-11 22:32:52 -0400
commit6d15ca0af0e070e67863c46b54d14f3664d925b4 (patch)
treeae1cbaee34bd8e44c8e43f93298246a5d8ddbd5a /drivers/gpu/drm/amd/include
parentdrm/amdkfd: fix zero reading of VMID and PASID for Hawaii (diff)
downloadlinux-dev-6d15ca0af0e070e67863c46b54d14f3664d925b4.tar.xz
linux-dev-6d15ca0af0e070e67863c46b54d14f3664d925b4.zip
drm/amd: Add gpu reset interfaces between amdgpu and amdkfd
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>
Diffstat (limited to 'drivers/gpu/drm/amd/include')
-rw-r--r--drivers/gpu/drm/amd/include/kgd_kfd_interface.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
index 76a30cbeee19..7df5e4ab839f 100644
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
@@ -280,6 +280,8 @@ struct tile_config {
* IH ring entry. This function allows the KFD ISR to get the VMID
* from the fault status register as early as possible.
*
+ * @gpu_recover: let kgd reset gpu after kfd detect CPC hang
+ *
* This structure contains function pointers to services that the kgd driver
* provides to amdkfd driver.
*
@@ -399,6 +401,8 @@ struct kfd2kgd_calls {
int (*get_vm_fault_info)(struct kgd_dev *kgd,
struct kfd_vm_fault_info *info);
uint32_t (*read_vmid_from_vmfault_reg)(struct kgd_dev *kgd);
+
+ void (*gpu_recover)(struct kgd_dev *kgd);
};
/**
@@ -424,6 +428,10 @@ struct kfd2kgd_calls {
* @schedule_evict_and_restore_process: Schedules work queue that will prepare
* for safe eviction of KFD BOs that belong to the specified process.
*
+ * @pre_reset: Notifies amdkfd that amdgpu about to reset the gpu
+ *
+ * @post_reset: Notify amdkfd that amgpu successfully reseted the gpu
+ *
* This structure contains function callback pointers so the kgd driver
* will notify to the amdkfd about certain status changes.
*
@@ -442,6 +450,8 @@ struct kgd2kfd_calls {
int (*resume_mm)(struct mm_struct *mm);
int (*schedule_evict_and_restore_process)(struct mm_struct *mm,
struct dma_fence *fence);
+ int (*pre_reset)(struct kfd_dev *kfd);
+ int (*post_reset)(struct kfd_dev *kfd);
};
int kgd2kfd_init(unsigned interface_version,