aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
diff options
context:
space:
mode:
authorHawking Zhang <[email protected]>2025-01-26 09:15:48 +0000
committerAlex Deucher <[email protected]>2025-02-17 19:09:29 +0000
commitad97840f954cc6834cc92324de9cde27ff0263db (patch)
treea47beedd96b3e35a767856c88d1a0f5adac0d42f /drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
parentdrm/amdgpu: Include ACA error type in aca bank (diff)
downloadkernel-ad97840f954cc6834cc92324de9cde27ff0263db.tar.gz
kernel-ad97840f954cc6834cc92324de9cde27ff0263db.zip
drm/amdgpu: Introduce funcs for generating cper record
Introduce new functions that are used to generate cper ue or ce records. v2: return -ENOMEM instead of false v2: check return value of fill section function Signed-off-by: Hawking Zhang <[email protected]> Signed-off-by: Xiang Liu <[email protected]> Reviewed-by: Yang Wang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
index 0ae845420983..6860a809f2f5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
@@ -26,6 +26,7 @@
#define __AMDGPU_CPER_H__
#include "amd_cper.h"
+#include "amdgpu_aca.h"
#define CPER_MAX_ALLOWED_COUNT 0x1000
#define HDR_LEN (sizeof(struct cper_hdr))
@@ -84,7 +85,13 @@ int amdgpu_cper_entry_fill_bad_page_threshold_section(struct amdgpu_device *adev
struct cper_hdr *amdgpu_cper_alloc_entry(struct amdgpu_device *adev,
enum amdgpu_cper_type type,
uint16_t section_count);
-
+/* UE must be encoded into separated cper entries, 1 UE 1 cper */
+int amdgpu_cper_generate_ue_record(struct amdgpu_device *adev,
+ struct aca_bank *bank);
+/* CEs and DEs are combined into 1 cper entry */
+int amdgpu_cper_generate_ce_records(struct amdgpu_device *adev,
+ struct aca_banks *banks,
+ uint16_t bank_count);
int amdgpu_cper_init(struct amdgpu_device *adev);
int amdgpu_cper_fini(struct amdgpu_device *adev);