File tree Expand file tree Collapse file tree
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3311,6 +3311,27 @@ int amdgpu_ras_reset_gpu(struct amdgpu_device *adev)
33113311 return 0 ;
33123312}
33133313
3314+ void amdgpu_ras_set_mca_debug_mode (struct amdgpu_device * adev , bool enable )
3315+ {
3316+ struct amdgpu_ras * con = amdgpu_ras_get_context (adev );
3317+
3318+ if (con )
3319+ con -> is_mca_debug_mode = enable ;
3320+ }
3321+
3322+ bool amdgpu_ras_get_mca_debug_mode (struct amdgpu_device * adev )
3323+ {
3324+ struct amdgpu_ras * con = amdgpu_ras_get_context (adev );
3325+ const struct amdgpu_mca_smu_funcs * mca_funcs = adev -> mca .mca_funcs ;
3326+
3327+ if (!con )
3328+ return false;
3329+
3330+ if (mca_funcs && mca_funcs -> mca_set_debug_mode )
3331+ return con -> is_mca_debug_mode ;
3332+ else
3333+ return true;
3334+ }
33143335
33153336/* Register each ip ras block into amdgpu ras */
33163337int amdgpu_ras_register_ras_block (struct amdgpu_device * adev ,
Original file line number Diff line number Diff line change @@ -434,6 +434,8 @@ struct amdgpu_ras {
434434
435435 /* Indicates smu whether need update bad channel info */
436436 bool update_channel_flag ;
437+ /* Record status of smu mca debug mode */
438+ bool is_mca_debug_mode ;
437439
438440 /* Record special requirements of gpu reset caller */
439441 uint32_t gpu_reset_flags ;
@@ -768,6 +770,9 @@ struct amdgpu_ras* amdgpu_ras_get_context(struct amdgpu_device *adev);
768770
769771int amdgpu_ras_set_context (struct amdgpu_device * adev , struct amdgpu_ras * ras_con );
770772
773+ void amdgpu_ras_set_mca_debug_mode (struct amdgpu_device * adev , bool enable );
774+ bool amdgpu_ras_get_mca_debug_mode (struct amdgpu_device * adev );
775+
771776int amdgpu_ras_register_ras_block (struct amdgpu_device * adev ,
772777 struct amdgpu_ras_block_object * ras_block_obj );
773778void amdgpu_ras_interrupt_fatal_error_handler (struct amdgpu_device * adev );
You can’t perform that action at this time.
0 commit comments