<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Yang Wang <kevinyang.wang@amd.com></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Kevin</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Sent:</b> Tuesday, December 14, 2021 3:12 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> 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><br>
<b>Subject:</b> [PATCH] drm/amd/pm: Skip power state allocation</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Power states are not valid for arcturus and aldebaran, no need to<br>
allocate memory.<br>
<br>
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com><br>
---<br>
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 10 ----------<br>
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 10 ----------<br>
2 files changed, 20 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c<br>
index 05defeee0c87..58bc387fb279 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c<br>
@@ -295,16 +295,6 @@ static int arcturus_allocate_dpm_context(struct smu_context *smu)<br>
return -ENOMEM;<br>
smu_dpm->dpm_context_size = sizeof(struct smu_11_0_dpm_context);<br>
<br>
- smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),<br>
- GFP_KERNEL);<br>
- if (!smu_dpm->dpm_current_power_state)<br>
- return -ENOMEM;<br>
-<br>
- smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),<br>
- GFP_KERNEL);<br>
- if (!smu_dpm->dpm_request_power_state)<br>
- return -ENOMEM;<br>
-<br>
return 0;<br>
}<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c<br>
index 6e781cee8bb6..0907da022197 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c<br>
@@ -262,16 +262,6 @@ static int aldebaran_allocate_dpm_context(struct smu_context *smu)<br>
return -ENOMEM;<br>
smu_dpm->dpm_context_size = sizeof(struct smu_13_0_dpm_context);<br>
<br>
- smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),<br>
- GFP_KERNEL);<br>
- if (!smu_dpm->dpm_current_power_state)<br>
- return -ENOMEM;<br>
-<br>
- smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),<br>
- GFP_KERNEL);<br>
- if (!smu_dpm->dpm_request_power_state)<br>
- return -ENOMEM;<br>
-<br>
return 0;<br>
}<br>
<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>