Skip to contentSkip to conversation

drm/amdgpu/gfx10: fix typo in gfx_v10_0_update_gfx_clock_gating()

PATCH In review Alex Deucher 3 participants 3 messages Oct 12, 2021 – Oct 15, 2021

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/gfx10: fix typo in gfx_v10_0_update_gfx_clock_gating()

Check was incorrectly converted to IP version checking.

Fixes 4b0ad8425498ba ("drm/amdgpu/gfx10: convert to IP version checking")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +3 -2
index 71bb3c0dc1da..8cec03949835 100644
@@ -8238,8 +8238,9 @@ static int gfx_v10_0_update_gfx_clock_gating(struct amdgpu_device *adev,
 		/* ===  CGCG + CGLS === */
 		gfx_v10_0_update_coarse_grain_clock_gating(adev, enable);
 
-		if ((adev->ip_versions[GC_HWIP][0] >= IP_VERSION(10, 1, 10)) &&
-		     (adev->ip_versions[GC_HWIP][0] <= IP_VERSION(10, 1, 2)))
+		if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 10)) ||
+		    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 1)) ||
+		    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 2)))
 			gfx_v10_0_apply_medium_grain_clock_gating_workaround(adev);
 	} else {
 		/* CGCG/CGLS should be disabled before MGCG/MGLS
Signature · 1 line
2.31.1
#1 lore raw

Ping.

Quoted 28 lines · Alex Deucher

Check was incorrectly converted to IP version checking.

Fixes 4b0ad8425498ba ("drm/amdgpu/gfx10: convert to IP version checking")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +3 -3
index 71bb3c0dc1da..8cec03949835 100644
@@ -8238,8 +8238,9 @@ static int gfx_v10_0_update_gfx_clock_gating(struct amdgpu_device *adev,
                /* ===  CGCG + CGLS === */
                gfx_v10_0_update_coarse_grain_clock_gating(adev, enable);
 
-               if ((adev->ip_versions[GC_HWIP][0] >= IP_VERSION(10, 1, 10)) &&
-                    (adev->ip_versions[GC_HWIP][0] <= IP_VERSION(10, 1, 2)))
+               if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 10)) ||
+                   (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 1)) ||
+                   (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 2)))
                        gfx_v10_0_apply_medium_grain_clock_gating_workaround(adev);
        } else {
                /* CGCG/CGLS should be disabled before MGCG/MGLS
--

2.31.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Deucher

[AMD Official Use Only]

Quoted 41 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, October 13, 2021 12:40 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/gfx10: fix typo in gfx_v10_0_update_gfx_clock_gating()

Check was incorrectly converted to IP version checking.

Fixes 4b0ad8425498ba ("drm/amdgpu/gfx10: convert to IP version checking")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0 -1
index 71bb3c0dc1da..8cec03949835 100644
@@ -8238,8 +8238,9 @@ static int
 gfx_v10_0_update_gfx_clock_gating(struct amdgpu_device *adev,
 		/* ===  CGCG + CGLS === */
 		gfx_v10_0_update_coarse_grain_clock_gating(adev, enable);
 
-		if ((adev->ip_versions[GC_HWIP][0] >= IP_VERSION(10, 1,

10)) &&

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -1
-		     (adev->ip_versions[GC_HWIP][0] <= IP_VERSION(10, 1, 2)))
+		if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1,

10)) ||

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
+		    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 1))

||

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
+		    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 2)))
	gfx_v10_0_apply_medium_grain_clock_gating_workaround(adev);
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0 -1
 	} else {
 		/* CGCG/CGLS should be disabled before MGCG/MGLS
--

2.31.1