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

Submitted by Alex Deucher on Sept. 14, 2016, 1:47 p.m.

Details

Message ID 1473860836-12401-1-git-send-email-alexander.deucher@amd.com
State New
Headers show
Series "drm/amdgpu/si/dpm: fix swapped ck enable" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Alex Deucher Sept. 14, 2016, 1:47 p.m.
Fixes a regression in:
drm/amd/amdgpu: Tidy up SI SMC code

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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/si_smc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/si_smc.c b/drivers/gpu/drm/amd/amdgpu/si_smc.c
index 2cc628c..47bbb40 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_smc.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_smc.c
@@ -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);
 }

Comments

Am 14.09.2016 um 15:47 schrieb Alex Deucher:
> Fixes a regression in:
> drm/amd/amdgpu: Tidy up SI SMC code
>
> bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=97801
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>.

> ---
>   drivers/gpu/drm/amd/amdgpu/si_smc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_smc.c b/drivers/gpu/drm/amd/amdgpu/si_smc.c
> index 2cc628c..47bbb40 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_smc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_smc.c
> @@ -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);
>   }