Skip to content

Commit 3806a8c

Browse files
Icenowyalexdeucher
authored andcommitted
drm/amdgpu: fix SI failure due to doorbells allocation
SI hardware does not have doorbells at all, however currently the code will try to do the allocation and thus fail, makes SI AMDGPU not usable. Fix this failure by skipping doorbells allocation when doorbells count is zero. Fixes: 54c30d2 ("drm/amdgpu: create kernel doorbell pages") Reviewed-by: Shashank Sharma <[email protected]> Signed-off-by: Icenowy Zheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ff89f06 commit 3806a8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ int amdgpu_doorbell_create_kernel_doorbells(struct amdgpu_device *adev)
142142
int r;
143143
int size;
144144

145+
/* SI HW does not have doorbells, skip allocation */
146+
if (adev->doorbell.num_kernel_doorbells == 0)
147+
return 0;
148+
145149
/* Reserve first num_kernel_doorbells (page-aligned) for kernel ops */
146150
size = ALIGN(adev->doorbell.num_kernel_doorbells * sizeof(u32), PAGE_SIZE);
147151

0 commit comments

Comments
 (0)