drm/amdkfd: Store queue cwsr area size to node properties
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 26 Jun 2024 18:52:28 +0000 (14:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Jul 2024 18:45:58 +0000 (14:45 -0400)
commit517fff221c1e6b8a8db69e7a440116caee120ff5
treef8ed69f364866806bb6b3b90fe6605e2f34e4de0
parent47c0388b0589cb481c294dcb857d25a214c46eb3
drm/amdkfd: Store queue cwsr area size to node properties

Use the queue eop buffer size, cwsr area size, ctl stack size
calculation from Thunk, store the value to KFD node properties.

Those will be used to validate queue eop buffer size, cwsr area size,
ctl stack size when creating KFD user compute queue.

Those will be exposed to user space via sysfs KFD node properties, to
remove the duplicate calculation code from Thunk.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_queue.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h