aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2023-03-31 16:30:01 +0530
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 12:34:30 -0400
commit3c87de6d034fcb756a10523367219c5564a85fd3 (patch)
treefc18471b041e9a128b53eb0f99fc1fa992723f44 /drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
parentdrm/amd/pm: add unique serial number support for smu_v13_0_6 (diff)
downloadlinux-rng-3c87de6d034fcb756a10523367219c5564a85fd3.tar.xz
linux-rng-3c87de6d034fcb756a10523367219c5564a85fd3.zip
drm/amd/pm: Fix power context allocation in SMU13
Use the right data structure for allocation. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c')
-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;
}