drm/amd/powerplay free driver_pptable for smu reinit
Subsystems (2)
-----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.
--- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +4 -2
@@ -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
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.
--- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +4 -2
@@ -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
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
Quoted 57 lines
-----Original Message-----
From: Zhang, Jack (Jian) <[email protected]>
Sent: Thursday, December 26, 2019 10:58 AM
To: Wang, Kevin(Yang) <[email protected]>; Feng, Kenneth <[email protected]>; Quan, Evan <[email protected]>; Zhang, Jack (Jian) <[email protected]>; [email protected]
Subject: RE: [PATCH] drm/amd/powerplay freedriver_pptablefor smu reinitPing...
-----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 freedriver_pptablefor 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 freedriver_pptablefor smu reinitDuring gpu recover, smu hw reinit will fail becasue table_context-
Quoted 1 line
driver_pptableis not freed and set to NULL.Free the
driver_pptablepointer 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(-)drivers/gpu/drm/amd/powerplay/smu_v11_0.c +4
-2@@ -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);
Quoted 2 lines
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx