drm/amd/pm: fix smu_v11_0_init_power power_context allocation
Subsystems (3)
PATCH 1/1 drm/amd/pm: fix smu_v11_0_init_power power_context allocation
Allocate smu_power->power_context to size of smu_11_0_power_context instead of smu_11_0_dpm_context.
Signed-off-by Ryan Taylor <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Reviewed-by Evan Quan <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +2 -2
@@ -469,11 +469,11 @@ int smu_v11_0_init_power(struct smu_context *smu) {struct smu_power_context *smu_power = &smu->smu_power; - smu_power->power_context =kzalloc (sizeof (struct smu_11_0_dpm_context ), + smu_power->power_context =kzalloc (sizeof (struct smu_11_0_power_context ),GFP_KERNEL );if (!smu_power->power_context)return -ENOMEM ; - smu_power->power_context_size =sizeof (struct smu_11_0_dpm_context ); + smu_power->power_context_size =sizeof (struct smu_11_0_power_context );return 0 ; }
Signature · 6 lines
2.29.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Ryan Taylor
Allocate
smu_power->power_contextto size ofsmu_11_0_power_contextinstead ofsmu_11_0_dpm_context.Signed-off-by Ryan Taylor <[email protected]>Reviewed-by Alex Deucher <[email protected]>Reviewed-by Evan Quan <[email protected]>
Looks good to me.
Thanks!
Alex
Quoted 25 lines
--- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +2
-3@@ -469,11 +469,11 @@ int smu_v11_0_init_power(struct smu_context *smu) {struct smu_power_context *smu_power = &smu->smu_power; - smu_power->power_context =kzalloc (sizeof (struct smu_11_0_dpm_context ), + smu_power->power_context =kzalloc (sizeof (struct smu_11_0_power_context ),GFP_KERNEL );if (!smu_power->power_context)return -ENOMEM ; - smu_power->power_context_size =sizeof (struct smu_11_0_dpm_context ); + smu_power->power_context_size =sizeof (struct smu_11_0_power_context );return 0 ; } --2.29.2
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx