Ping... -----Original Message----- From: Zhang, Jack (Jian) Sent: Tuesday, December 24, 2019 1:05 PM To: Wang, Kevin(Yang) <[email protected]>; Feng, Kenneth <[email protected]>; Quan, Evan <[email protected]>; Jack Zhang <[email protected]>; [email protected] Subject: RE: [PATCH] drm/amd/powerplay free driver_pptable for smu reinit
-----Original Message----- From: Jack Zhang <[email protected]> Sent: Tuesday, December 24, 2019 1:05 PM To: [email protected] Cc: Zhang, Jack (Jian) <[email protected]> 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 <[email protected]> --- 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
