Skip to contentSkip to conversation

drm/amdgpu: fix handling of irq domains on soc15 and newer GPUs

PATCH In review Alex Deucher 2 participants 2 messages Dec 18, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix handling of irq domains on soc15 and newer GPUs

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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +2 -1
index bea57e8e793f..afbbec82a289 100644
@@ -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) {
Signature · 6 lines
2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Am 18.12.20 um 17:53 schrieb Alex Deucher:

Quoted 5 lines

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.

I've seen that multiple times as well but always forgot to ask if that's right or wrong.

Quoted 2 lines
Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -0
index bea57e8e793f..afbbec82a289 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c void amdgpu_irq_dispatch(struct amdgpu_device *adev, · line 451

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +2 -1
@@ -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) {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx