summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Taylor <Ryan.Taylor@amd.com>2020-11-10 14:20:08 -0800
committerAlex Deucher <alexander.deucher@amd.com>2020-11-18 14:36:04 -0500
commiteb45604e29481ce20e737ec20fdd41a40b222742 (patch)
tree81d8f3f7bca6bced2fc8bbecd085ef73e8f70553
parent8976f73b676eb96d27ac1f7034fb36dd22292e21 (diff)
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 <Ryan.Taylor@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
index d5fa0d9dd7ebe..7144ea4c0b787 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
@@ -470,11 +470,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;
}