mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
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>
This commit is contained in:
committed by
Alex Deucher
parent
31220ee9dc
commit
367a0af433
@@ -377,7 +377,8 @@ int pqm_create_queue(struct process_queue_manager *pqm,
|
||||
*/
|
||||
uint32_t first_db_index = amdgpu_doorbell_index_on_bar(pdd->dev->adev,
|
||||
pdd->qpd.proc_doorbells,
|
||||
0);
|
||||
0,
|
||||
pdd->dev->kfd->device_info.doorbell_size);
|
||||
|
||||
*p_doorbell_offset_in_process = (q->properties.doorbell_off
|
||||
- first_db_index) * sizeof(uint32_t);
|
||||
|
||||
Reference in New Issue
Block a user