As I know, the smu hw reinit is not on the path of gpu recover. Can you help me understand the use case? Regards, Evan > -----Original Message----- > From: Zhang, Jack (Jian) <Jack.Zhang1@xxxxxxx> > Sent: Thursday, December 26, 2019 10:58 AM > To: Wang, Kevin(Yang) <Kevin1.Wang@xxxxxxx>; Feng, Kenneth > <Kenneth.Feng@xxxxxxx>; Quan, Evan <Evan.Quan@xxxxxxx>; Zhang, Jack > (Jian) <Jack.Zhang1@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Subject: RE: [PATCH] drm/amd/powerplay free driver_pptable for smu reinit > > Ping... > > -----Original Message----- > From: Zhang, Jack (Jian) > Sent: Tuesday, December 24, 2019 1:05 PM > To: Wang, Kevin(Yang) <Kevin1.Wang@xxxxxxx>; Feng, Kenneth > <Kenneth.Feng@xxxxxxx>; Quan, Evan <Evan.Quan@xxxxxxx>; Jack Zhang > <Jack.Zhang1@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Subject: RE: [PATCH] drm/amd/powerplay free driver_pptable for smu reinit > > > > -----Original Message----- > From: Jack Zhang <Jack.Zhang1@xxxxxxx> > Sent: Tuesday, December 24, 2019 1:05 PM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Zhang, Jack (Jian) <Jack.Zhang1@xxxxxxx> > Subject: [PATCH] drm/amd/powerplay free driver_pptable for smu reinit > > During gpu recover, smu hw reinit will fail becasue table_context- > >driver_pptable is not freed and set to NULL. > > Free the driver_pptable pointer if it's not NULL. > > Signed-off-by: Jack Zhang <Jack.Zhang1@xxxxxxx> > --- > drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > index 7781d24..ca877bd 100644 > --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > @@ -713,8 +713,10 @@ int smu_v11_0_parse_pptable(struct smu_context > *smu) > struct smu_table_context *table_context = &smu->smu_table; > struct smu_table *table = &table_context- > >tables[SMU_TABLE_PPTABLE]; > > - if (table_context->driver_pptable) > - return -EINVAL; > + if (table_context->driver_pptable) { > + kfree(table_context->driver_pptable); > + table_context->driver_pptable = NULL; > + } > > table_context->driver_pptable = kzalloc(table->size, GFP_KERNEL); > > -- > 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx