drm/amdkfd: get doorbell's absolute offset based on the db_size
authorArvind Yadav <Arvind.Yadav@amd.com>
Mon, 9 Oct 2023 17:13:16 +0000 (22:43 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Oct 2023 21:02:34 +0000 (17:02 -0400)
commit367a0af43373d4f791cc8b466a659ecf5aa52377
tree094145374e3006f86c22c0529f953a8cd5af7168
parent31220ee9dc5a3e25d38d29d3816b6e79d8c39abc
drm/amdkfd: get doorbell's absolute offset based on the db_size

Here, Adding db_size in byte to find the doorbell's
absolute offset for both 32-bit and 64-bit doorbell sizes.
So that doorbell offset will be aligned based on the doorbell
size.

v2:
- Addressed the review comment from Felix.
v3:
- Adding doorbell_size as parameter to get db absolute offset.
v4:
  Squash the two patches into one.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c