On Fri, Aug 16, 2024 at 3:55 AM <Trigger.Huang@xxxxxxx> wrote: > > From: Trigger Huang <Trigger.Huang@xxxxxxx> > > Add new separate parameter to control GPU coredump procedure. This can > be used to decouple the coredump procedure from gpu recovery procedure > > V2: enable gpu_coredump by default (Alex) > > Signed-off-by: Trigger Huang <Trigger.Huang@xxxxxxx> I still don't think we'd want to turn this off. Does it ever hurt anything? It seems like someone would accidentally turn this off and then run into a hang and regret it because the didn't get a dump. Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ > 2 files changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > index 937de21a7142..4dd465ad14af 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > @@ -201,6 +201,7 @@ extern uint amdgpu_force_long_training; > extern int amdgpu_lbpw; > extern int amdgpu_compute_multipipe; > extern int amdgpu_gpu_recovery; > +extern int amdgpu_gpu_coredump; > extern int amdgpu_emu_mode; > extern uint amdgpu_smu_memory_pool_size; > extern int amdgpu_smu_pptable_id; > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > index b9529948f2b2..06bd20d83db7 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > @@ -178,6 +178,7 @@ uint amdgpu_force_long_training; > int amdgpu_lbpw = -1; > int amdgpu_compute_multipipe = -1; > int amdgpu_gpu_recovery = -1; /* auto */ > +int amdgpu_gpu_coredump = 1; > int amdgpu_emu_mode; > uint amdgpu_smu_memory_pool_size; > int amdgpu_smu_pptable_id = -1; > @@ -556,6 +557,13 @@ module_param_named(compute_multipipe, amdgpu_compute_multipipe, int, 0444); > MODULE_PARM_DESC(gpu_recovery, "Enable GPU recovery mechanism, (1 = enable, 0 = disable, -1 = auto)"); > module_param_named(gpu_recovery, amdgpu_gpu_recovery, int, 0444); > > +/** > + * DOC: gpu_coredump (int) > + * Set to enable GPU coredump mechanism (1 = enable, 0 = disable). The default is 1 > + */ > +MODULE_PARM_DESC(gpu_coredump, "Enable GPU coredump mechanism, (1 = enable(default), 0 = disable)"); > +module_param_named(gpu_coredump, amdgpu_gpu_coredump, int, 0444); > + > /** > * DOC: emu_mode (int) > * Set value 1 to enable emulation mode. This is only needed when running on an emulator. The default is 0 (disabled). > -- > 2.34.1 >