All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] S4 issue on CI
@ 2016-08-30  1:21 jimqu
       [not found] ` <1472520111-17899-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: jimqu @ 2016-08-30  1:21 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: jimqu

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(-)

-- 
1.9.1

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

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

* [PATCH 1/3] drm/amd/amdgpu: VCE ring test fail during S4 on CI
       [not found] ` <1472520111-17899-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
@ 2016-08-30  1:21   ` jimqu
       [not found]     ` <1472520111-17899-2-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
  2016-08-30  1:21   ` [PATCH 2/3] drm/amd/amdgpu: sdma resume " jimqu
  2016-08-30  1:21   ` [PATCH 3/3] drm/amd/amdgpu: compute ring test " jimqu
  2 siblings, 1 reply; 7+ messages in thread
From: jimqu @ 2016-08-30  1:21 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: jimqu

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

Change-Id: I68e315f8b62c6e3a8636bc5e14036ecc11d980b4
Signed-off-by: JimQu <Jim.Qu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 9b71d6c..50993df 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -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;
 }
 
-- 
1.9.1

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

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

* [PATCH 2/3] drm/amd/amdgpu: sdma resume fail during S4 on CI
       [not found] ` <1472520111-17899-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
  2016-08-30  1:21   ` [PATCH 1/3] drm/amd/amdgpu: VCE ring test fail during S4 " jimqu
@ 2016-08-30  1:21   ` jimqu
       [not found]     ` <1472520111-17899-3-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
  2016-08-30  1:21   ` [PATCH 3/3] drm/amd/amdgpu: compute ring test " jimqu
  2 siblings, 1 reply; 7+ messages in thread
From: jimqu @ 2016-08-30  1:21 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: jimqu

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

Change-Id: Iaff231330c256fbd297f2a98edb2d956bd0d78f8
Signed-off-by: JimQu <Jim.Qu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index e71cd12..5d025d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -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

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

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

* [PATCH 3/3] drm/amd/amdgpu: compute ring test fail during S4 on CI
       [not found] ` <1472520111-17899-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
  2016-08-30  1:21   ` [PATCH 1/3] drm/amd/amdgpu: VCE ring test fail during S4 " jimqu
  2016-08-30  1:21   ` [PATCH 2/3] drm/amd/amdgpu: sdma resume " jimqu
@ 2016-08-30  1:21   ` jimqu
       [not found]     ` <1472520111-17899-4-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
  2 siblings, 1 reply; 7+ messages in thread
From: jimqu @ 2016-08-30  1:21 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: jimqu

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

Change-Id: Ib27e4e02e7e2782a9ab528f5358dce5ff2501e17
Signed-off-by: JimQu <Jim.Qu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index f055d49..99afab8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -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

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

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

* Re: [PATCH 2/3] drm/amd/amdgpu: sdma resume fail during S4 on CI
       [not found]     ` <1472520111-17899-3-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
@ 2016-08-30  5:39       ` Alex Deucher
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2016-08-30  5:39 UTC (permalink / raw)
  To: jimqu; +Cc: amd-gfx list

On Mon, Aug 29, 2016 at 9:21 PM, jimqu <Jim.Qu@amd.com> wrote:
> SDMA could be fail in the thaw() and restore() processes, do software reset
> if each SDMA engine is busy.
>
> Change-Id: Iaff231330c256fbd297f2a98edb2d956bd0d78f8
> Signed-off-by: JimQu <Jim.Qu@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
> index e71cd12..5d025d0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 3/3] drm/amd/amdgpu: compute ring test fail during S4 on CI
       [not found]     ` <1472520111-17899-4-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
@ 2016-08-30  5:43       ` Alex Deucher
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2016-08-30  5:43 UTC (permalink / raw)
  To: jimqu; +Cc: amd-gfx list

On Mon, Aug 29, 2016 at 9:21 PM, jimqu <Jim.Qu@amd.com> wrote:
> unhalt F32`s Instrction Fetch Unit after all rings are inited.
>
> Change-Id: Ib27e4e02e7e2782a9ab528f5358dce5ff2501e17
> Signed-off-by: JimQu <Jim.Qu@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> index f055d49..99afab8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 1/3] drm/amd/amdgpu: VCE ring test fail during S4 on CI
       [not found]     ` <1472520111-17899-2-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
@ 2016-08-30  7:41       ` Christian König
  0 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2016-08-30  7:41 UTC (permalink / raw)
  To: jimqu, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 30.08.2016 um 03:21 schrieb jimqu:
> 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.

>
> Change-Id: I68e315f8b62c6e3a8636bc5e14036ecc11d980b4
> Signed-off-by: JimQu <Jim.Qu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index 9b71d6c..50993df 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -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;
>   }
>   


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

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

end of thread, other threads:[~2016-08-30  7:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30  1:21 [PATCH 0/3] S4 issue on CI jimqu
     [not found] ` <1472520111-17899-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2016-08-30  1:21   ` [PATCH 1/3] drm/amd/amdgpu: VCE ring test fail during S4 " jimqu
     [not found]     ` <1472520111-17899-2-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2016-08-30  7:41       ` Christian König
2016-08-30  1:21   ` [PATCH 2/3] drm/amd/amdgpu: sdma resume " jimqu
     [not found]     ` <1472520111-17899-3-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2016-08-30  5:39       ` Alex Deucher
2016-08-30  1:21   ` [PATCH 3/3] drm/amd/amdgpu: compute ring test " jimqu
     [not found]     ` <1472520111-17899-4-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2016-08-30  5:43       ` Alex Deucher

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.