Skip to content

Commit ea5309d

Browse files
Tao Zhoualexdeucher
authored andcommitted
drm/amdgpu: add VCN 4.0 RAS poison consumption handling
Register irq handler. Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 56ea353 commit ea5309d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ static int vcn_v4_0_sw_init(void *handle)
135135
if (r)
136136
return r;
137137

138+
/* VCN POISON TRAP */
139+
r = amdgpu_irq_add_id(adev, amdgpu_ih_clientid_vcns[i],
140+
VCN_4_0__SRCID_UVD_POISON, &adev->vcn.inst[i].irq);
141+
if (r)
142+
return r;
143+
138144
ring = &adev->vcn.inst[i].ring_enc[0];
139145
ring->use_doorbell = true;
140146
if (amdgpu_sriov_vf(adev))
@@ -299,6 +305,7 @@ static int vcn_v4_0_hw_fini(void *handle)
299305
}
300306
}
301307

308+
amdgpu_irq_put(adev, &adev->vcn.inst[i].irq, 0);
302309
}
303310

304311
return 0;
@@ -1942,6 +1949,9 @@ static int vcn_v4_0_process_interrupt(struct amdgpu_device *adev, struct amdgpu_
19421949
case VCN_4_0__SRCID__UVD_ENC_GENERAL_PURPOSE:
19431950
amdgpu_fence_process(&adev->vcn.inst[ip_instance].ring_enc[0]);
19441951
break;
1952+
case VCN_4_0__SRCID_UVD_POISON:
1953+
amdgpu_vcn_process_poison_irq(adev, source, entry);
1954+
break;
19451955
default:
19461956
DRM_ERROR("Unhandled interrupt: %d %d\n",
19471957
entry->src_id, entry->src_data[0]);

0 commit comments

Comments
 (0)