[PATCH 2/3] drm/amdgpu: enabled software IH ring for Vega

Christian König ckoenig.leichtzumerken at gmail.com
Mon Nov 2 19:58:08 UTC 2020


Am 02.11.20 um 19:59 schrieb Felix Kuehling:
> Am 2020-11-02 um 1:53 p.m. schrieb Alex Deucher:
>> On Mon, Nov 2, 2020 at 6:34 AM Christian König
>> <ckoenig.leichtzumerken at gmail.com> wrote:
>>> Seems like we won't get the hardware IH1/2 rings on Vega20 working.
>>>
>>> Signed-off-by: Christian König <christian.koenig at amd.com>
>>> ---
>>>   drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
>>> index 407c6093c2ec..cef61dd46a37 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
>>> @@ -91,6 +91,9 @@ static void vega10_ih_enable_interrupts(struct amdgpu_device *adev)
>>>                  }
>>>                  adev->irq.ih2.enabled = true;
>>>          }
>>> +
>>> +       if (adev->irq.ih_soft.ring_size)
>>> +               adev->irq.ih_soft.enabled = true;
>>>   }
>>>
>>>   /**
>>> @@ -606,6 +609,10 @@ static int vega10_ih_sw_init(void *handle)
>>>          adev->irq.ih2.use_doorbell = true;
>>>          adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
>>>
>>> +       r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, PAGE_SIZE, true);
>>> +       if (r)
>>> +               return r;
>>> +
>> Should we only enable this on vega20?
> It affects other GPUs as well. Including probably some Navi GPUs. We'll
> probably need a similar change in navi10_ih.c.
>
> Is there a way to reliably detect whether IH redirection works. Or do we
> need to allocate the soft IH ring unconditionally?

We can allocate it unconditionally on Vega and Navi, it's just a single 
page ring buffer which is only used when needed.

What worries me more is that testing shows that I can't even enable IV 
tracing or risk that a single CPU becomes so busy with processing IVs 
that I get "stuck for 23 seconds" warnings.

We *really* need the hardware to work correctly either by using the CAM 
for filtering page faults or by redirecting them to the different IH ring.

Regards,
Christian.

>
> Regards,
>    Felix
>
>
>> Alex
>>
>>
>>>          r = amdgpu_irq_init(adev);
>>>
>>>          return r;
>>> --
>>> 2.25.1
>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list