All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/pm: Skip power state allocation
@ 2021-12-14  7:12 Lijo Lazar
  2021-12-14  7:39 ` Wang, Yang(Kevin)
  2021-12-14  7:48 ` Quan, Evan
  0 siblings, 2 replies; 3+ messages in thread
From: Lijo Lazar @ 2021-12-14  7:12 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alexander.Deucher, Kevin1.Wang, Evan.Quan, Hawking.Zhang

Power states are not valid for arcturus and aldebaran, no need to
allocate memory.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c  | 10 ----------
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 10 ----------
 2 files changed, 20 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
index 05defeee0c87..58bc387fb279 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
@@ -295,16 +295,6 @@ static int arcturus_allocate_dpm_context(struct smu_context *smu)
 		return -ENOMEM;
 	smu_dpm->dpm_context_size = sizeof(struct smu_11_0_dpm_context);
 
-	smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
-				       GFP_KERNEL);
-	if (!smu_dpm->dpm_current_power_state)
-		return -ENOMEM;
-
-	smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
-				       GFP_KERNEL);
-	if (!smu_dpm->dpm_request_power_state)
-		return -ENOMEM;
-
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index 6e781cee8bb6..0907da022197 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -262,16 +262,6 @@ static int aldebaran_allocate_dpm_context(struct smu_context *smu)
 		return -ENOMEM;
 	smu_dpm->dpm_context_size = sizeof(struct smu_13_0_dpm_context);
 
-	smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
-						   GFP_KERNEL);
-	if (!smu_dpm->dpm_current_power_state)
-		return -ENOMEM;
-
-	smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
-						   GFP_KERNEL);
-	if (!smu_dpm->dpm_request_power_state)
-		return -ENOMEM;
-
 	return 0;
 }
 
-- 
2.25.1


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

* Re: [PATCH] drm/amd/pm: Skip power state allocation
  2021-12-14  7:12 [PATCH] drm/amd/pm: Skip power state allocation Lijo Lazar
@ 2021-12-14  7:39 ` Wang, Yang(Kevin)
  2021-12-14  7:48 ` Quan, Evan
  1 sibling, 0 replies; 3+ messages in thread
From: Wang, Yang(Kevin) @ 2021-12-14  7:39 UTC (permalink / raw)
  To: Lazar, Lijo, amd-gfx; +Cc: Deucher, Alexander, Quan, Evan, Zhang, Hawking

[-- Attachment #1: Type: text/plain, Size: 2745 bytes --]

[AMD Official Use Only]

Reviewed-by: Yang Wang <kevinyang.wang@amd.com>

Best Regards,
Kevin
________________________________
From: Lazar, Lijo <Lijo.Lazar@amd.com>
Sent: Tuesday, December 14, 2021 3:12 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Zhang, Hawking <Hawking.Zhang@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Wang, Yang(Kevin) <KevinYang.Wang@amd.com>; Quan, Evan <Evan.Quan@amd.com>
Subject: [PATCH] drm/amd/pm: Skip power state allocation

Power states are not valid for arcturus and aldebaran, no need to
allocate memory.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c  | 10 ----------
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 10 ----------
 2 files changed, 20 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
index 05defeee0c87..58bc387fb279 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
@@ -295,16 +295,6 @@ static int arcturus_allocate_dpm_context(struct smu_context *smu)
                 return -ENOMEM;
         smu_dpm->dpm_context_size = sizeof(struct smu_11_0_dpm_context);

-       smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
-                                      GFP_KERNEL);
-       if (!smu_dpm->dpm_current_power_state)
-               return -ENOMEM;
-
-       smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
-                                      GFP_KERNEL);
-       if (!smu_dpm->dpm_request_power_state)
-               return -ENOMEM;
-
         return 0;
 }

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index 6e781cee8bb6..0907da022197 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -262,16 +262,6 @@ static int aldebaran_allocate_dpm_context(struct smu_context *smu)
                 return -ENOMEM;
         smu_dpm->dpm_context_size = sizeof(struct smu_13_0_dpm_context);

-       smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
-                                                  GFP_KERNEL);
-       if (!smu_dpm->dpm_current_power_state)
-               return -ENOMEM;
-
-       smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
-                                                  GFP_KERNEL);
-       if (!smu_dpm->dpm_request_power_state)
-               return -ENOMEM;
-
         return 0;
 }

--
2.25.1


[-- Attachment #2: Type: text/html, Size: 5923 bytes --]

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

* RE: [PATCH] drm/amd/pm: Skip power state allocation
  2021-12-14  7:12 [PATCH] drm/amd/pm: Skip power state allocation Lijo Lazar
  2021-12-14  7:39 ` Wang, Yang(Kevin)
@ 2021-12-14  7:48 ` Quan, Evan
  1 sibling, 0 replies; 3+ messages in thread
From: Quan, Evan @ 2021-12-14  7:48 UTC (permalink / raw)
  To: Lazar, Lijo, amd-gfx
  Cc: Deucher, Alexander, Wang, Yang(Kevin), Zhang, Hawking

[AMD Official Use Only]

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: Lazar, Lijo <Lijo.Lazar@amd.com>
> Sent: Tuesday, December 14, 2021 3:13 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zhang, Hawking <Hawking.Zhang@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Wang, Yang(Kevin)
> <KevinYang.Wang@amd.com>; Quan, Evan <Evan.Quan@amd.com>
> Subject: [PATCH] drm/amd/pm: Skip power state allocation
> 
> Power states are not valid for arcturus and aldebaran, no need to
> allocate memory.
> 
> Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c  | 10 ----------
>  drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 10 ----------
>  2 files changed, 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
> index 05defeee0c87..58bc387fb279 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
> @@ -295,16 +295,6 @@ static int arcturus_allocate_dpm_context(struct
> smu_context *smu)
>  		return -ENOMEM;
>  	smu_dpm->dpm_context_size = sizeof(struct
> smu_11_0_dpm_context);
> 
> -	smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct
> smu_power_state),
> -				       GFP_KERNEL);
> -	if (!smu_dpm->dpm_current_power_state)
> -		return -ENOMEM;
> -
> -	smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct
> smu_power_state),
> -				       GFP_KERNEL);
> -	if (!smu_dpm->dpm_request_power_state)
> -		return -ENOMEM;
> -
>  	return 0;
>  }
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> index 6e781cee8bb6..0907da022197 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> @@ -262,16 +262,6 @@ static int aldebaran_allocate_dpm_context(struct
> smu_context *smu)
>  		return -ENOMEM;
>  	smu_dpm->dpm_context_size = sizeof(struct
> smu_13_0_dpm_context);
> 
> -	smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct
> smu_power_state),
> -						   GFP_KERNEL);
> -	if (!smu_dpm->dpm_current_power_state)
> -		return -ENOMEM;
> -
> -	smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct
> smu_power_state),
> -						   GFP_KERNEL);
> -	if (!smu_dpm->dpm_request_power_state)
> -		return -ENOMEM;
> -
>  	return 0;
>  }
> 
> --
> 2.25.1

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

end of thread, other threads:[~2021-12-14  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14  7:12 [PATCH] drm/amd/pm: Skip power state allocation Lijo Lazar
2021-12-14  7:39 ` Wang, Yang(Kevin)
2021-12-14  7:48 ` Quan, Evan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.