drm/amdgpu: add hdp ras structures
authorHawking Zhang <Hawking.Zhang@amd.com>
Wed, 28 Apr 2021 13:22:46 +0000 (21:22 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:06:43 +0000 (18:06 -0400)
centralize all hdp ras operation to ras_funcs

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: John Clements <John.Clements@amd.com>
Reviewed-by: Dennis Li <Dennis.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_hdp.h

index 43caf9f8cc110a8a561ba6e5a8cbdaf287be7778..c89cf8d90282f8b545596982ad265dee6831901d 100644 (file)
 #ifndef __AMDGPU_HDP_H__
 #define __AMDGPU_HDP_H__
 
+struct amdgpu_hdp_ras_funcs {
+       int (*ras_late_init)(struct amdgpu_device *adev);
+       void (*ras_fini)(struct amdgpu_device *adev);
+       void (*query_ras_error_count)(struct amdgpu_device *adev,
+                                     void *ras_error_status);
+       void (*reset_ras_error_count)(struct amdgpu_device *adev);
+};
+
 struct amdgpu_hdp_funcs {
        void (*flush_hdp)(struct amdgpu_device *adev, struct amdgpu_ring *ring);
        void (*invalidate_hdp)(struct amdgpu_device *adev,
@@ -34,7 +42,9 @@ struct amdgpu_hdp_funcs {
 };
 
 struct amdgpu_hdp {
+       struct ras_common_if                    *ras_if;
        const struct amdgpu_hdp_funcs           *funcs;
+       const struct amdgpu_hdp_ras_funcs       *ras_funcs;
 };
 
 #endif /* __AMDGPU_HDP_H__ */