Skip to contentSkip to conversation

S4 issue on CI

PATCH NAK jimqu 3 participants 7 messages Aug 30, 2016 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

jimqu

author
#0 lore raw

cover S4 issue on CI

These series patches are used for fixing S4 issue on CI

jimqu (3):
drm/amd/amdgpu: VCE ring test fail during S4 on CI drm/amd/amdgpu: sdma resume fail during S4 on CI drm/amd/amdgpu: compute ring test fail during S4 on CI

 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c |  7 ++++++-
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c   |  3 +++
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c   | 12 +++++++++---
 3 files changed, 18 insertions(+), 4 deletions(-)
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#2 lore raw

PATCH 1/3 drm/amd/amdgpu: VCE ring test fail during S4 on CI

In reply to a message not in the archive

Set up the VCE clock no matter dpm is enabled or not.

Change-Id I68e315f8b62c6e3a8636bc5e14036ecc11d980b4
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +6 -1
index 9b71d6c..50993df 100644
@@ -812,11 +812,13 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)
 	unsigned i;
 	int r;
 
+	amdgpu_asic_set_vce_clocks(adev, 53300, 40000);
+
 	r = amdgpu_ring_alloc(ring, 16);
 	if (r) {
 		DRM_ERROR("amdgpu: vce failed to lock ring %d (%d).\n",
 			  ring->idx, r);
-		return r;
+		goto done;
 	}
 	amdgpu_ring_write(ring, VCE_CMD_END);
 	amdgpu_ring_commit(ring);
@@ -836,6 +838,9 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)
 		r = -ETIMEDOUT;
 	}
 
+done:
+	amdgpu_asic_set_vce_clocks(adev, 0, 0);
+
 	return r;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#5 lore raw

PATCH 2/3 drm/amd/amdgpu: sdma resume fail during S4 on CI

In reply to a message not in the archive

SDMA could be fail in the thaw() and restore() processes, do software reset if each SDMA engine is busy.

Change-Id Iaff231330c256fbd297f2a98edb2d956bd0d78f8
---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +3 -0
index e71cd12..5d025d0 100644
@@ -52,6 +52,7 @@ static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_irq_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_buffer_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_vm_pte_funcs(struct amdgpu_device *adev);
+static int cik_sdma_soft_reset(void *handle);
 
 MODULE_FIRMWARE("radeon/bonaire_sdma.bin");
 MODULE_FIRMWARE("radeon/bonaire_sdma1.bin");
@@ -998,6 +999,8 @@ static int cik_sdma_resume(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	cik_sdma_soft_reset(handle);
+
 	return cik_sdma_hw_init(adev);
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#8 lore raw

PATCH 3/3 drm/amd/amdgpu: compute ring test fail during S4 on CI

In reply to a message not in the archive

unhalt F32`s Instrction Fetch Unit after all rings are inited.

Change-Id Ib27e4e02e7e2782a9ab528f5358dce5ff2501e17
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +9 -3
index f055d49..99afab8 100644
@@ -2755,8 +2755,7 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
 	u64 wb_gpu_addr;
 	u32 *buf;
 	struct bonaire_mqd *mqd;
-
-	gfx_v7_0_cp_compute_enable(adev, true);
+	struct amdgpu_ring *ring;
 
 	/* fix up chicken bits */
 	tmp = RREG32(mmCP_CPF_DEBUG);
@@ -2791,7 +2790,7 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
 
 	/* init the queues.  Just two for now. */
 	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
-		struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
+		ring = &adev->gfx.compute_ring[i];
 
 		if (ring->mqd_obj == NULL) {
 			r = amdgpu_bo_create(adev,
@@ -2970,6 +2969,13 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
 		amdgpu_bo_unreserve(ring->mqd_obj);
 
 		ring->ready = true;
+	}
+
+	gfx_v7_0_cp_compute_enable(adev, true);
+
+	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
+		ring = &adev->gfx.compute_ring[i];
+
 		r = amdgpu_ring_test_ring(ring);
 		if (r)
 			ring->ready = false;
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#7 lore raw

Re: [PATCH 2/3] drm/amd/amdgpu: sdma resume fail during S4 on CI

In reply to a message not in the archive
Quoted 5 lines · jimqu

SDMA could be fail in the thaw() and restore() processes, do software reset if each SDMA engine is busy.

Change-Id Iaff231330c256fbd297f2a98edb2d956bd0d78f8
Quoted 28 lines
---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +3 -1
index e71cd12..5d025d0 100644
@@ -52,6 +52,7 @@ static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_irq_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_buffer_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_vm_pte_funcs(struct amdgpu_device *adev);
+static int cik_sdma_soft_reset(void *handle);
 
 MODULE_FIRMWARE("radeon/bonaire_sdma.bin");
 MODULE_FIRMWARE("radeon/bonaire_sdma1.bin");
@@ -998,6 +999,8 @@ static int cik_sdma_resume(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       cik_sdma_soft_reset(handle);
+
        return cik_sdma_hw_init(adev);
 }
 
--

1.9.1

Quoted 4 lines

_______________________________________________
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

Reviewed-by
#10 lore raw

Re: [PATCH 3/3] drm/amd/amdgpu: compute ring test fail during S4 on CI

In reply to a message not in the archive
Quoted 4 lines · jimqu

unhalt F32`s Instrction Fetch Unit after all rings are inited.

Change-Id Ib27e4e02e7e2782a9ab528f5358dce5ff2501e17
Quoted 44 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +9 -4
index f055d49..99afab8 100644
@@ -2755,8 +2755,7 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
        u64 wb_gpu_addr;
        u32 *buf;
        struct bonaire_mqd *mqd;
-
-       gfx_v7_0_cp_compute_enable(adev, true);
+       struct amdgpu_ring *ring;
 
        /* fix up chicken bits */
        tmp = RREG32(mmCP_CPF_DEBUG);
@@ -2791,7 +2790,7 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
 
        /* init the queues.  Just two for now. */
        for (i = 0; i < adev->gfx.num_compute_rings; i++) {
-               struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
+               ring = &adev->gfx.compute_ring[i];
 
                if (ring->mqd_obj == NULL) {
                        r = amdgpu_bo_create(adev,
@@ -2970,6 +2969,13 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
                amdgpu_bo_unreserve(ring->mqd_obj);
 
                ring->ready = true;
+       }
+
+       gfx_v7_0_cp_compute_enable(adev, true);
+
+       for (i = 0; i < adev->gfx.num_compute_rings; i++) {
+               ring = &adev->gfx.compute_ring[i];
+
                r = amdgpu_ring_test_ring(ring);
                if (r)
                        ring->ready = false;
--

1.9.1

Quoted 4 lines

_______________________________________________
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

#4 lore raw

Re: [PATCH 1/3] drm/amd/amdgpu: VCE ring test fail during S4 on CI

In reply to a message not in the archive

Am 30.08.2016 um 03:21 schrieb jimqu:

Quoted 1 line

Set up the VCE clock no matter dpm is enabled or not.

NAK, if DPM or powerplay is enabled you are totally confusing it by messing with the clocks manually.

Christian.

Quoted 27 lines
Change-Id I68e315f8b62c6e3a8636bc5e14036ecc11d980b4
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +3 -1
index 9b71d6c..50993df 100644
@@ -812,11 +812,13 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)
  	unsigned i;
  	int r;
 
+	amdgpu_asic_set_vce_clocks(adev, 53300, 40000);
+
  	r = amdgpu_ring_alloc(ring, 16);
  	if (r) {
  		DRM_ERROR("amdgpu: vce failed to lock ring %d (%d).\n",
  			  ring->idx, r);
-		return r;
+		goto done;
  	}
  	amdgpu_ring_write(ring, VCE_CMD_END);
  	amdgpu_ring_commit(ring);

drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring) · line 846

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +3 -0
@@ -836,6 +838,9 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)
  		r = -ETIMEDOUT;
  	}
 
+done:
+	amdgpu_asic_set_vce_clocks(adev, 0, 0);
+
  	return r;
  }
 

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