summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
diff options
context:
space:
mode:
authorShaoyun Liu2018-07-12 04:32:56 +0200
committerOded Gabbay2018-07-12 04:32:56 +0200
commite42051d2133b7912db99bd3a307c9219a88fe7c2 (patch)
tree2c5a8c8149af2b94af15aa1316ea43d6b98da349 /drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
parentdrm/amdgpu: Call KFD reset handlers during GPU reset (diff)
downloadkernel-qcow2-linux-e42051d2133b7912db99bd3a307c9219a88fe7c2.tar.gz
kernel-qcow2-linux-e42051d2133b7912db99bd3a307c9219a88fe7c2.tar.xz
kernel-qcow2-linux-e42051d2133b7912db99bd3a307c9219a88fe7c2.zip
drm/amdkfd: Implement GPU reset handlers in KFD
Lock KFD and evict existing queues on reset. Notify user mode by signaling hw_exception events. 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/amdkfd/kfd_chardev.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_chardev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 7e717716b90e..b5338bff8cef 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -122,6 +122,9 @@ static int kfd_open(struct inode *inode, struct file *filep)
if (IS_ERR(process))
return PTR_ERR(process);
+ if (kfd_is_locked())
+ return -EAGAIN;
+
dev_dbg(kfd_device, "process %d opened, compat mode (32 bit) - %d\n",
process->pasid, process->is_32bit_user_mode);