Skip to contentSkip to conversation

drm/amdgpu/si/dpm: fix swapped ck enable

PATCH In review Alex Deucher 3 participants 3 messages Sep 14, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/si/dpm: fix swapped ck enable

Fixes a regression in:
drm/amd/amdgpu: Tidy up SI SMC code

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=97801

---
 drivers/gpu/drm/amd/amdgpu/si_smc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/si_smc.c +2 -2
index 2cc628c..47bbb40 100644
@@ -143,9 +143,9 @@ void si_smc_clock(struct amdgpu_device *adev, bool enable)
 	u32 tmp = RREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0);
 
 	if (enable)
-		tmp |= CK_DISABLE;
-	else
 		tmp &= ~CK_DISABLE;
+	else
+		tmp |= CK_DISABLE;
 
 	WREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0, tmp);
 }
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1473860836-12401-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 14.09.2016 um 15:47 schrieb Alex Deucher:

Quoted 7 lines

Fixes a regression in:
drm/amd/amdgpu: Tidy up SI SMC code

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=97801

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/si_smc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/si_smc.c +0 -0
index 2cc628c..47bbb40 100644
@@ -143,9 +143,9 @@ void si_smc_clock(struct amdgpu_device *adev, bool enable)
  	u32 tmp = RREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0);

drivers/gpu/drm/amd/amdgpu/si_smc.c void si_smc_clock(struct amdgpu_device *adev, bool enable) · line 151

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/si_smc.c +2 -2
 
  	if (enable)
-		tmp |= CK_DISABLE;
-	else
  		tmp &= ~CK_DISABLE;
+	else
+		tmp |= CK_DISABLE;
 
  	WREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0, tmp);
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#3 lore raw
In reply to a message not in the archive

Yup, that looks better. My apologies. Guess that's the downside of having assertions for enable and disable in the same driver.

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Wednesday, September 14, 2016 09:47
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH] drm/amdgpu/si/dpm: fix swapped ck enable

Fixes a regression in:
drm/amd/amdgpu: Tidy up SI SMC code

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=97801

---
 drivers/gpu/drm/amd/amdgpu/si_smc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/si_smc.c +2 -2
index 2cc628c..47bbb40 100644
@@ -143,9 +143,9 @@ void si_smc_clock(struct amdgpu_device *adev, bool enable)
         u32 tmp = RREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0);
 
         if (enable)
-               tmp |= CK_DISABLE;
-       else
                 tmp &= ~CK_DISABLE;
+       else
+               tmp |= CK_DISABLE;
 
         WREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0, tmp);
 }

--
2.5.5

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx