]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: fix clock counter retrieval for node without GPU
authorAndres Rodriguez <andres.rodriguez@amd.com>
Tue, 10 Apr 2018 21:32:33 +0000 (17:32 -0400)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 24 Apr 2018 09:34:44 +0000 (12:34 +0300)
commit4f4957172363975e90cd1e6a66a224afca5edf7f
tree35bc2fe2f2bc298e0e63833e88695a4ab266ce69
parent25315429bede56e1520ce8871919bebfe1230350
drm/amdkfd: fix clock counter retrieval for node without GPU

Currently if a user requests clock counters for a node without a GPU
resource we will always return EINVAL.

Instead if no GPU resource is attached, fill the gpu_clock_counter
argument with zeroes so that we may proceed and return valid CPU
counters.

Signed-off-by: Andres Rodriguez <andres.rodriguez@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c