All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu/gfx10: make ring tests less chatty
@ 2019-12-13 18:48 Alex Deucher
  2019-12-13 18:48 ` [PATCH 2/2] drm/amdgpu/sdma5: " Alex Deucher
  2019-12-13 19:47 ` [PATCH 1/2] drm/amdgpu/gfx10: " Christian König
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Deucher @ 2019-12-13 18:48 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

We already did this for older generations.

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

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 8cdef79de9d4..3ede19ce9f1f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -472,18 +472,10 @@ static int gfx_v10_0_ring_test_ring(struct amdgpu_ring *ring)
 		else
 			udelay(1);
 	}
-	if (i < adev->usec_timeout) {
-		if (amdgpu_emu_mode == 1)
-			DRM_INFO("ring test on %d succeeded in %d msecs\n",
-				 ring->idx, i);
-		else
-			DRM_INFO("ring test on %d succeeded in %d usecs\n",
-				 ring->idx, i);
-	} else {
-		DRM_ERROR("amdgpu: ring %d test failed (scratch(0x%04X)=0x%08X)\n",
-			  ring->idx, scratch, tmp);
-		r = -EINVAL;
-	}
+
+	if (i >= adev->usec_timeout)
+		r = -ETIMEDOUT;
+
 	amdgpu_gfx_scratch_free(adev, scratch);
 
 	return r;
@@ -533,14 +525,10 @@ static int gfx_v10_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)
 	}
 
 	tmp = RREG32(scratch);
-	if (tmp == 0xDEADBEEF) {
-		DRM_INFO("ib test on ring %d succeeded\n", ring->idx);
+	if (tmp == 0xDEADBEEF)
 		r = 0;
-	} else {
-		DRM_ERROR("amdgpu: ib test failed (scratch(0x%04X)=0x%08X)\n",
-			  scratch, tmp);
+	else
 		r = -EINVAL;
-	}
 err2:
 	amdgpu_ib_free(adev, &ib, NULL);
 	dma_fence_put(f);
@@ -3607,23 +3595,16 @@ static int gfx_v10_0_cp_resume(struct amdgpu_device *adev)
 
 	for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
 		ring = &adev->gfx.gfx_ring[i];
-		DRM_INFO("gfx %d ring me %d pipe %d q %d\n",
-			 i, ring->me, ring->pipe, ring->queue);
-		r = amdgpu_ring_test_ring(ring);
-		if (r) {
-			ring->sched.ready = false;
+		r = amdgpu_ring_test_helper(ring);
+		if (r)
 			return r;
-		}
 	}
 
 	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
 		ring = &adev->gfx.compute_ring[i];
-		ring->sched.ready = true;
-		DRM_INFO("compute ring %d mec %d pipe %d q %d\n",
-			 i, ring->me, ring->pipe, ring->queue);
-		r = amdgpu_ring_test_ring(ring);
+		r = amdgpu_ring_test_helper(ring);
 		if (r)
-			ring->sched.ready = false;
+			return r;
 	}
 
 	return 0;
-- 
2.23.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] drm/amdgpu/sdma5: make ring tests less chatty
  2019-12-13 18:48 [PATCH 1/2] drm/amdgpu/gfx10: make ring tests less chatty Alex Deucher
@ 2019-12-13 18:48 ` Alex Deucher
  2019-12-13 19:47 ` [PATCH 1/2] drm/amdgpu/gfx10: " Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2019-12-13 18:48 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

We already did this for older generations.

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

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
index 64c53eed7fac..1b502396fcd4 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
@@ -907,16 +907,9 @@ static int sdma_v5_0_ring_test_ring(struct amdgpu_ring *ring)
 			udelay(1);
 	}
 
-	if (i < adev->usec_timeout) {
-		if (amdgpu_emu_mode == 1)
-			DRM_INFO("ring test on %d succeeded in %d msecs\n", ring->idx, i);
-		else
-			DRM_INFO("ring test on %d succeeded in %d usecs\n", ring->idx, i);
-	} else {
-		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
-			  ring->idx, tmp);
-		r = -EINVAL;
-	}
+	if (i >= adev->usec_timeout)
+		r = -ETIMEDOUT;
+
 	amdgpu_device_wb_free(adev, index);
 
 	return r;
@@ -981,13 +974,10 @@ static int sdma_v5_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)
 		goto err1;
 	}
 	tmp = le32_to_cpu(adev->wb.wb[index]);
-	if (tmp == 0xDEADBEEF) {
-		DRM_INFO("ib test on ring %d succeeded\n", ring->idx);
+	if (tmp == 0xDEADBEEF)
 		r = 0;
-	} else {
-		DRM_ERROR("amdgpu: ib test failed (0x%08X)\n", tmp);
+	else
 		r = -EINVAL;
-	}
 
 err1:
 	amdgpu_ib_free(adev, &ib, NULL);
-- 
2.23.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu/gfx10: make ring tests less chatty
  2019-12-13 18:48 [PATCH 1/2] drm/amdgpu/gfx10: make ring tests less chatty Alex Deucher
  2019-12-13 18:48 ` [PATCH 2/2] drm/amdgpu/sdma5: " Alex Deucher
@ 2019-12-13 19:47 ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2019-12-13 19:47 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx; +Cc: Alex Deucher

Am 13.12.19 um 19:48 schrieb Alex Deucher:
> We already did this for older generations.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 39 +++++++-------------------
>   1 file changed, 10 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 8cdef79de9d4..3ede19ce9f1f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -472,18 +472,10 @@ static int gfx_v10_0_ring_test_ring(struct amdgpu_ring *ring)
>   		else
>   			udelay(1);
>   	}
> -	if (i < adev->usec_timeout) {
> -		if (amdgpu_emu_mode == 1)
> -			DRM_INFO("ring test on %d succeeded in %d msecs\n",
> -				 ring->idx, i);
> -		else
> -			DRM_INFO("ring test on %d succeeded in %d usecs\n",
> -				 ring->idx, i);
> -	} else {
> -		DRM_ERROR("amdgpu: ring %d test failed (scratch(0x%04X)=0x%08X)\n",
> -			  ring->idx, scratch, tmp);
> -		r = -EINVAL;
> -	}
> +
> +	if (i >= adev->usec_timeout)
> +		r = -ETIMEDOUT;
> +
>   	amdgpu_gfx_scratch_free(adev, scratch);
>   
>   	return r;
> @@ -533,14 +525,10 @@ static int gfx_v10_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)
>   	}
>   
>   	tmp = RREG32(scratch);
> -	if (tmp == 0xDEADBEEF) {
> -		DRM_INFO("ib test on ring %d succeeded\n", ring->idx);
> +	if (tmp == 0xDEADBEEF)
>   		r = 0;
> -	} else {
> -		DRM_ERROR("amdgpu: ib test failed (scratch(0x%04X)=0x%08X)\n",
> -			  scratch, tmp);
> +	else
>   		r = -EINVAL;
> -	}
>   err2:
>   	amdgpu_ib_free(adev, &ib, NULL);
>   	dma_fence_put(f);
> @@ -3607,23 +3595,16 @@ static int gfx_v10_0_cp_resume(struct amdgpu_device *adev)
>   
>   	for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
>   		ring = &adev->gfx.gfx_ring[i];
> -		DRM_INFO("gfx %d ring me %d pipe %d q %d\n",
> -			 i, ring->me, ring->pipe, ring->queue);
> -		r = amdgpu_ring_test_ring(ring);
> -		if (r) {
> -			ring->sched.ready = false;
> +		r = amdgpu_ring_test_helper(ring);
> +		if (r)
>   			return r;
> -		}
>   	}
>   
>   	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
>   		ring = &adev->gfx.compute_ring[i];
> -		ring->sched.ready = true;
> -		DRM_INFO("compute ring %d mec %d pipe %d q %d\n",
> -			 i, ring->me, ring->pipe, ring->queue);
> -		r = amdgpu_ring_test_ring(ring);
> +		r = amdgpu_ring_test_helper(ring);
>   		if (r)
> -			ring->sched.ready = false;
> +			return r;
>   	}
>   
>   	return 0;

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-13 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 18:48 [PATCH 1/2] drm/amdgpu/gfx10: make ring tests less chatty Alex Deucher
2019-12-13 18:48 ` [PATCH 2/2] drm/amdgpu/sdma5: " Alex Deucher
2019-12-13 19:47 ` [PATCH 1/2] drm/amdgpu/gfx10: " Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.