amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/pm: fix smu_v11_0_init_power power_context allocation
@ 2020-11-12 22:22 Ryan Taylor
  2020-11-13 20:22 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan Taylor @ 2020-11-12 22:22 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Evan Quan, Ryan Taylor

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>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 4 ++--
 1 file 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 b880c72c322c..9ec5e30edbee 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
@@ -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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amd/pm: fix smu_v11_0_init_power power_context allocation
  2020-11-12 22:22 [PATCH] drm/amd/pm: fix smu_v11_0_init_power power_context allocation Ryan Taylor
@ 2020-11-13 20:22 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2020-11-13 20:22 UTC (permalink / raw)
  To: Ryan Taylor; +Cc: Alex Deucher, Evan Quan, amd-gfx list

On Thu, Nov 12, 2020 at 5:23 PM Ryan Taylor <Ryan.Taylor@amd.com> wrote:
>
> 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>

Looks good to me.

Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 4 ++--
>  1 file 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 b880c72c322c..9ec5e30edbee 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
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-13 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 22:22 [PATCH] drm/amd/pm: fix smu_v11_0_init_power power_context allocation Ryan Taylor
2020-11-13 20:22 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).