Commit 9f18985d authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher

drm/amdgpu: don't create ih ring 1 and ring 2 for APU

APUs don't support ih ring 1 and ring 2.
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 26f2daa4
...@@ -489,20 +489,21 @@ static int vega10_ih_sw_init(void *handle) ...@@ -489,20 +489,21 @@ static int vega10_ih_sw_init(void *handle)
adev->irq.ih.use_doorbell = true; adev->irq.ih.use_doorbell = true;
adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1; adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true); if (!(adev->flags & AMD_IS_APU)) {
if (r) r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
return r; if (r)
return r;
adev->irq.ih1.use_doorbell = true;
adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true); adev->irq.ih1.use_doorbell = true;
if (r) adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
return r;
adev->irq.ih2.use_doorbell = true; r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1; if (r)
return r;
adev->irq.ih2.use_doorbell = true;
adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
}
/* initialize ih control registers offset */ /* initialize ih control registers offset */
vega10_ih_init_register_offset(adev); vega10_ih_init_register_offset(adev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment