[PATCH] drm/amd/pm: Fix power context allocation in SMU13
Alex Deucher
alexdeucher at gmail.com
Thu Jun 1 16:19:08 UTC 2023
On Thu, Jun 1, 2023 at 10:31 AM Hawking Zhang <Hawking.Zhang at amd.com> wrote:
>
> From: Lijo Lazar <lijo.lazar at amd.com>
>
> Use the right data structure for allocation.
>
> Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
> Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++--
> 1 file 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 da059b02a153..09ac66ab9c34 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
> @@ -534,11 +534,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;
> }
> --
> 2.17.1
>
More information about the amd-gfx
mailing list