]> Git Repo - linux.git/commitdiff
drm/amdgpu: complement the IH node_id table for multiple AIDs
authorLe Ma <[email protected]>
Fri, 25 Feb 2022 07:14:19 +0000 (15:14 +0800)
committerAlex Deucher <[email protected]>
Fri, 9 Jun 2023 13:43:50 +0000 (09:43 -0400)
With different node_id, the SDMA interrupt from multiple AIDs can be
distinguished by sw driver.

Signed-off-by: Le Ma <[email protected]>
Acked-by: Felix Kuehling <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c

index 031610c1340a305f98bc3993d906b07195307f49..3dafaf70c9878d9912c2813b20125982fccfa14b 100644 (file)
@@ -100,12 +100,16 @@ const char *soc15_ih_clientid_name[] = {
 };
 
 const int node_id_to_phys_map[NODEID_MAX] = {
+       [AID0_NODEID] = 0,
        [XCD0_NODEID] = 0,
        [XCD1_NODEID] = 1,
+       [AID1_NODEID] = 1,
        [XCD2_NODEID] = 2,
        [XCD3_NODEID] = 3,
+       [AID2_NODEID] = 2,
        [XCD4_NODEID] = 4,
        [XCD5_NODEID] = 5,
+       [AID3_NODEID] = 3,
        [XCD6_NODEID] = 6,
        [XCD7_NODEID] = 7,
 };
index efe8a278cbdf9493ae3a162ee8ce88b739ef392c..04c0b4fa17a4e7bf9628c52f9d03cbcd443f81ee 100644 (file)
@@ -102,13 +102,17 @@ struct amdgpu_irq {
        bool                            retry_cam_enabled;
 };
 
-enum interrupt_node_id_per_xcp {
+enum interrupt_node_id_per_aid {
+       AID0_NODEID = 0,
        XCD0_NODEID = 1,
        XCD1_NODEID = 2,
+       AID1_NODEID = 4,
        XCD2_NODEID = 5,
        XCD3_NODEID = 6,
+       AID2_NODEID = 8,
        XCD4_NODEID = 9,
        XCD5_NODEID = 10,
+       AID3_NODEID = 12,
        XCD6_NODEID = 13,
        XCD7_NODEID = 14,
        NODEID_MAX,
index 6935a24d1e89f547edf6717e6e7a1cd057a95ac5..d3c7f9a43ef13f53a8f525d8917b62b47a587ee1 100644 (file)
@@ -1492,6 +1492,9 @@ static int sdma_v4_4_2_process_trap_irq(struct amdgpu_device *adev,
 
        DRM_DEBUG("IH: SDMA trap\n");
        instance = sdma_v4_4_2_irq_id_to_seq(entry->client_id);
+       instance += node_id_to_phys_map[entry->node_id] *
+                       adev->sdma.num_inst_per_aid;
+
        switch (entry->ring_id) {
        case 0:
                amdgpu_fence_process(&adev->sdma.instance[instance].ring);
This page took 0.065489 seconds and 4 git commands to generate.