File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -3311,6 +3311,27 @@ int amdgpu_ras_reset_gpu(struct amdgpu_device *adev)
3311
3311
return 0 ;
3312
3312
}
3313
3313
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
+ }
3314
3335
3315
3336
/* Register each ip ras block into amdgpu ras */
3316
3337
int 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 {
434
434
435
435
/* Indicates smu whether need update bad channel info */
436
436
bool update_channel_flag ;
437
+ /* Record status of smu mca debug mode */
438
+ bool is_mca_debug_mode ;
437
439
438
440
/* Record special requirements of gpu reset caller */
439
441
uint32_t gpu_reset_flags ;
@@ -768,6 +770,9 @@ struct amdgpu_ras* amdgpu_ras_get_context(struct amdgpu_device *adev);
768
770
769
771
int amdgpu_ras_set_context (struct amdgpu_device * adev , struct amdgpu_ras * ras_con );
770
772
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
+
771
776
int amdgpu_ras_register_ras_block (struct amdgpu_device * adev ,
772
777
struct amdgpu_ras_block_object * ras_block_obj );
773
778
void amdgpu_ras_interrupt_fatal_error_handler (struct amdgpu_device * adev );
You can’t perform that action at this time.
0 commit comments