[Patch v1 4/5] drm/amdkfd: show warning when kfd is locked
Felix Kuehling
felix.kuehling at amd.com
Tue Jan 28 22:42:12 UTC 2020
On 2020-01-27 20:29, Rajneesh Bhardwaj wrote:
> 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.
>
> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> index 1aebda4bbbe7..081cc5f40d18 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -127,6 +127,8 @@ static int kfd_open(struct inode *inode, struct file *filep)
> return PTR_ERR(process);
>
> if (kfd_is_locked()) {
> + dev_warn(kfd_device, "kfd is locked!\n"
> + "process %d unreferenced", process->pasid);
If this is for debugging, make it dev_dbg. Printing warnings like this
usually confuses people reporting completely unrelated problems that
aren't even kernel problems at all. "Look, I found a warning in the
kernel log. It must be a kernel problem."
Regards,
Felix
> kfd_unref_process(process);
> return -EAGAIN;
> }
More information about the amd-gfx
mailing list