drm/amdgpu: fix handling of irq domains on soc15 and newer GPUs
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 18 Dec 2020 16:49:16 +0000 (11:49 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Dec 2020 20:07:30 +0000 (15:07 -0500)
We need to take into account the client id otherwise we'll end
up sending generic events for any src id that is registered.

We only support irq domains on pre-soc15 parts so client is
always legacy.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

index bea57e8..afbbec8 100644 (file)
@@ -444,7 +444,8 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev,
        } else  if (src_id >= AMDGPU_MAX_IRQ_SRC_ID) {
                DRM_DEBUG("Invalid src_id in IV: %d\n", src_id);
 
-       } else if (adev->irq.virq[src_id]) {
+       } else if ((client_id == AMDGPU_IRQ_CLIENTID_LEGACY) &&
+                  adev->irq.virq[src_id]) {
                generic_handle_irq(irq_find_mapping(adev->irq.domain, src_id));
 
        } else if (!adev->irq.client[client_id].sources) {