<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">You could even write why it was disabled before and why you can enable it now again in the commit message.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">//Ernst<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Den tis 11 maj 2021 kl 09:25 skrev Chen, Jiansong (Simon) <<a href="mailto:Jiansong.Chen@amd.com">Jiansong.Chen@amd.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[AMD Official Use Only - Internal Distribution Only]<br>
<br>
Better to make the commit msg more specific, eg. Change predicate accordingly since aspm is enabled by default.<br>
Either way,  Reviewed-by: Jiansong Chen <<a href="mailto:Jiansong.Chen@amd.com" target="_blank">Jiansong.Chen@amd.com</a>><br>
<br>
Regards,<br>
Jiansong<br>
-----Original Message-----<br>
From: amd-gfx <<a href="mailto:amd-gfx-bounces@lists.freedesktop.org" target="_blank">amd-gfx-bounces@lists.freedesktop.org</a>> On Behalf Of Kenneth Feng<br>
Sent: Tuesday, May 11, 2021 11:04 AM<br>
To: <a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
Cc: Feng, Kenneth <<a href="mailto:Kenneth.Feng@amd.com" target="_blank">Kenneth.Feng@amd.com</a>><br>
Subject: [PATCH] drm/amd/pm: enable ASPM by default<br>
<br>
enable ASPM by default<br>
<br>
Signed-off-by: Kenneth Feng <<a href="mailto:kenneth.feng@amd.com" target="_blank">kenneth.feng@amd.com</a>><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/nv.c                         | 2 +-<br>
 drivers/gpu/drm/amd/amdgpu/soc15.c                      | 2 +-<br>
 drivers/gpu/drm/amd/amdgpu/vi.c                         | 2 +-<br>
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-<br>
 4 files changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 82a380be8368..2fcfd893edc5 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/nv.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c<br>
@@ -598,7 +598,7 @@ static void nv_pcie_gen3_enable(struct amdgpu_device *adev)<br>
<br>
 static void nv_program_aspm(struct amdgpu_device *adev)  {<br>
-       if (amdgpu_aspm != 1)<br>
+       if (!amdgpu_aspm)<br>
                return;<br>
<br>
        if (!(adev->flags & AMD_IS_APU) &&<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
index 49ece2a7f9f0..4b660b2d1c22 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
@@ -817,7 +817,7 @@ static void soc15_pcie_gen3_enable(struct amdgpu_device *adev)<br>
<br>
 static void soc15_program_aspm(struct amdgpu_device *adev)  {<br>
-       if (amdgpu_aspm != 1)<br>
+       if (!amdgpu_aspm)<br>
                return;<br>
<br>
        if (!(adev->flags & AMD_IS_APU) &&<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index 735ebbd1148f..3d21c0799037 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/vi.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c<br>
@@ -1136,7 +1136,7 @@ static void vi_program_aspm(struct amdgpu_device *adev)<br>
        bool bL1SS = false;<br>
        bool bClkReqSupport = true;<br>
<br>
-       if (amdgpu_aspm != 1)<br>
+       if (!amdgpu_aspm)<br>
                return;<br>
<br>
        if (adev->flags & AMD_IS_APU ||<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c<br>
index d2fd44b903ca..270b2b0b8e8a 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c<br>
@@ -302,7 +302,7 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu,<br>
        if (smu->dc_controlled_by_gpio)<br>
        *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ACDC_BIT);<br>
<br>
-       if (amdgpu_aspm == 1)<br>
+       if (amdgpu_aspm)<br>
                *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_LCLK_BIT);<br>
<br>
        return 0;<br>
--<br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7CJiansong.Chen%40amd.com%7C414e894d646e4161c7ab08d914296d92%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637562990432397285%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TvVZdWM32y8rOn154m%2B0pLvHxk9fEuOaiBqiIxXSxiE%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7CJiansong.Chen%40amd.com%7C414e894d646e4161c7ab08d914296d92%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637562990432397285%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TvVZdWM32y8rOn154m%2B0pLvHxk9fEuOaiBqiIxXSxiE%3D&amp;reserved=0</a><br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</blockquote></div>