drm/amdgpu: fix to print incorrect wptr address

Submitted by Huang, Ray on April 14, 2017, 2:50 a.m.

Details

Message ID 1492138203-24349-1-git-send-email-ray.huang@amd.com
State New
Headers show
Series "drm/amdgpu: fix to print incorrect wptr address" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Huang, Ray April 14, 2017, 2:50 a.m.
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index da4559b..4736196 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -326,8 +326,8 @@  static void sdma_v4_0_ring_set_wptr(struct amdgpu_ring *ring)
 				"mmSDMA%i_GFX_RB_WPTR == 0x%08x "
 				"mmSDMA%i_GFX_RB_WPTR_HI == 0x%08x \n",
 				me,
-				me,
 				lower_32_bits(ring->wptr << 2),
+				me,
 				upper_32_bits(ring->wptr << 2));
 		WREG32(sdma_v4_0_get_reg_offset(me, mmSDMA0_GFX_RB_WPTR), lower_32_bits(ring->wptr << 2));
 		WREG32(sdma_v4_0_get_reg_offset(me, mmSDMA0_GFX_RB_WPTR_HI), upper_32_bits(ring->wptr << 2));

Comments

On 14/04/17 11:50 AM, Huang Rui wrote:
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> index da4559b..4736196 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> @@ -326,8 +326,8 @@ static void sdma_v4_0_ring_set_wptr(struct amdgpu_ring *ring)
>  				"mmSDMA%i_GFX_RB_WPTR == 0x%08x "
>  				"mmSDMA%i_GFX_RB_WPTR_HI == 0x%08x \n",
>  				me,
> -				me,
>  				lower_32_bits(ring->wptr << 2),
> +				me,
>  				upper_32_bits(ring->wptr << 2));
>  		WREG32(sdma_v4_0_get_reg_offset(me, mmSDMA0_GFX_RB_WPTR), lower_32_bits(ring->wptr << 2));
>  		WREG32(sdma_v4_0_get_reg_offset(me, mmSDMA0_GFX_RB_WPTR_HI), upper_32_bits(ring->wptr << 2));
> 

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>