aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2023-03-31 16:30:01 +0530
committerAlex Deucher <[email protected]>2023-06-09 12:34:30 -0400
commit3c87de6d034fcb756a10523367219c5564a85fd3 (patch)
treefc18471b041e9a128b53eb0f99fc1fa992723f44
parent5e86aa29a338f5c25e2d10d021bffc6b1b560ad5 (diff)
drm/amd/pm: Fix power context allocation in SMU13
Use the right data structure for allocation. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index b24c8549d0b1..70db36d45974 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -538,11 +538,11 @@ int smu_v13_0_init_power(struct smu_context *smu)
if (smu_power->power_context || smu_power->power_context_size != 0)
return -EINVAL;
- smu_power->power_context = kzalloc(sizeof(struct smu_13_0_dpm_context),
+ smu_power->power_context = kzalloc(sizeof(struct smu_13_0_power_context),
GFP_KERNEL);
if (!smu_power->power_context)
return -ENOMEM;
- smu_power->power_context_size = sizeof(struct smu_13_0_dpm_context);
+ smu_power->power_context_size = sizeof(struct smu_13_0_power_context);
return 0;
}