Skip to content

Commit 4058e7c

Browse files
Xiang Liualexdeucher
authored andcommitted
drm/amdgpu: Commit CPER entry
Commit the CPER entry to the ring buffer. Signed-off-by: Xiang Liu <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8652920 commit 4058e7c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ int amdgpu_cper_generate_ue_record(struct amdgpu_device *adev,
280280
{
281281
struct cper_hdr *fatal = NULL;
282282
struct cper_sec_crashdump_reg_data reg_data = { 0 };
283+
struct amdgpu_ring *ring = &adev->cper.ring_buf;
283284
int ret;
284285

285286
fatal = amdgpu_cper_alloc_entry(adev, AMDGPU_CPER_TYPE_FATAL, 1);
@@ -302,7 +303,7 @@ int amdgpu_cper_generate_ue_record(struct amdgpu_device *adev,
302303
if (ret)
303304
return ret;
304305

305-
/*TODO: commit the cper entry to cper ring */
306+
amdgpu_cper_ring_write(ring, fatal, fatal->record_length);
306307

307308
return 0;
308309
}
@@ -329,6 +330,7 @@ int amdgpu_cper_generate_ce_records(struct amdgpu_device *adev,
329330
{
330331
struct cper_hdr *corrected = NULL;
331332
enum cper_error_severity sev = CPER_SEV_NON_FATAL_CORRECTED;
333+
struct amdgpu_ring *ring = &adev->cper.ring_buf;
332334
uint32_t reg_data[CPER_ACA_REG_COUNT] = { 0 };
333335
struct aca_bank_node *node;
334336
struct aca_bank *bank;
@@ -377,7 +379,7 @@ int amdgpu_cper_generate_ce_records(struct amdgpu_device *adev,
377379
return ret;
378380
}
379381

380-
/*TODO: commit the cper entry to cper ring */
382+
amdgpu_cper_ring_write(ring, corrected, corrected->record_length);
381383

382384
return 0;
383385
}

0 commit comments

Comments
 (0)