drm/amdkfd: show warning when kfd is locked
authorRajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Tue, 21 Jan 2020 19:34:51 +0000 (14:34 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Feb 2020 21:00:47 +0000 (16:00 -0500)
During system suspend the kfd driver aquires a lock that prohibits
further kfd actions unless the gpu is resumed. This adds some info which
can be useful while debugging.

Reviewed-by: Oak Zeng <oak.zeng@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

index 3f0300e537277d130f1e025274ce58259834196e..8d56afd76eb3d5e20c1519fc87bbc8bd5b56af8c 100644 (file)
@@ -127,6 +127,8 @@ static int kfd_open(struct inode *inode, struct file *filep)
                return PTR_ERR(process);
 
        if (kfd_is_locked()) {
+               dev_dbg(kfd_device, "kfd is locked!\n"
+                               "process %d unreferenced", process->pasid);
                kfd_unref_process(process);
                return -EAGAIN;
        }