All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable.
@ 2017-04-18  7:02 Rex Zhu
       [not found] ` <1492498929-19160-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Rex Zhu @ 2017-04-18  7:02 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu

Change-Id: I22a7851d4a87028778dfdc18b3da2ed856a8092b
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index d0890ad..5348710 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -1406,6 +1406,7 @@ static int gfx_v8_0_kiq_init_ring(struct amdgpu_device *adev,
 
 	return r;
 }
+
 static void gfx_v8_0_kiq_free_ring(struct amdgpu_ring *ring,
 				   struct amdgpu_irq_src *irq)
 {
@@ -4744,7 +4745,7 @@ static int gfx_v8_0_kiq_kcq_disable(struct amdgpu_device *adev)
 		DRM_UDELAY(1);
 	}
 	if (i >= adev->usec_timeout) {
-		DRM_ERROR("KCQ enable failed (scratch(0x%04X)=0x%08X)\n",
+		DRM_ERROR("KCQ disabled failed (scratch(0x%04X)=0x%08X)\n",
 			  scratch, tmp);
 		r = -EINVAL;
 	}
-- 
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] 6+ messages in thread

* [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in gfx8.
       [not found] ` <1492498929-19160-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-18  7:02   ` Rex Zhu
       [not found]     ` <1492498929-19160-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
  2017-04-18  7:02   ` [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9 Rex Zhu
  2017-04-18 13:47   ` [PATCH 1/3] drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable Deucher, Alexander
  2 siblings, 1 reply; 6+ messages in thread
From: Rex Zhu @ 2017-04-18  7:02 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu

Change-Id: Iab362ad196a3d515e5ac8d9a7c925b0752c96830
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 5348710..563944a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -6827,8 +6827,6 @@ static int gfx_v8_0_kiq_set_interrupt_state(struct amdgpu_device *adev,
 {
 	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
 
-	BUG_ON(ring->funcs->type != AMDGPU_RING_TYPE_KIQ);
-
 	switch (type) {
 	case AMDGPU_CP_KIQ_IRQ_DRIVER0:
 		WREG32_FIELD(CPC_INT_CNTL, GENERIC2_INT_ENABLE,
@@ -6858,8 +6856,6 @@ static int gfx_v8_0_kiq_irq(struct amdgpu_device *adev,
 	u8 me_id, pipe_id, queue_id;
 	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
 
-	BUG_ON(ring->funcs->type != AMDGPU_RING_TYPE_KIQ);
-
 	me_id = (entry->ring_id & 0x0c) >> 2;
 	pipe_id = (entry->ring_id & 0x03) >> 0;
 	queue_id = (entry->ring_id & 0x70) >> 4;
-- 
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] 6+ messages in thread

* [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9.
       [not found] ` <1492498929-19160-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
  2017-04-18  7:02   ` [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in gfx8 Rex Zhu
@ 2017-04-18  7:02   ` Rex Zhu
       [not found]     ` <1492498929-19160-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
  2017-04-18 13:47   ` [PATCH 1/3] drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable Deucher, Alexander
  2 siblings, 1 reply; 6+ messages in thread
From: Rex Zhu @ 2017-04-18  7:02 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu

the system will trigger BUG_ON When amdgpu_fini is called,
the IRQ source will be cleaned before IRQ uninstalled
becasue of the sequence of ip_block.
so not set irq source.

Change-Id: I64b99247c36edb84bd209905eb24b391720b4d8f
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index f6b2329..84b31a4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -631,7 +631,6 @@ static int gfx_v9_0_kiq_init_ring(struct amdgpu_device *adev,
 		ring->pipe = 1;
 	}
 
-	irq->data = ring;
 	ring->queue = 0;
 	ring->eop_gpu_addr = kiq->eop_gpu_addr;
 	sprintf(ring->name, "kiq %d.%d.%d", ring->me, ring->pipe, ring->queue);
@@ -647,7 +646,6 @@ static void gfx_v9_0_kiq_free_ring(struct amdgpu_ring *ring,
 {
 	amdgpu_wb_free(ring->adev, ring->adev->virt.reg_val_offs);
 	amdgpu_ring_fini(ring);
-	irq->data = NULL;
 }
 
 /* create MQD for each compute queue */
@@ -3367,9 +3365,7 @@ static int gfx_v9_0_kiq_set_interrupt_state(struct amdgpu_device *adev,
 					    enum amdgpu_interrupt_state state)
 {
 	uint32_t tmp, target;
-	struct amdgpu_ring *ring = (struct amdgpu_ring *)src->data;
-
-	BUG_ON(!ring || (ring->funcs->type != AMDGPU_RING_TYPE_KIQ));
+	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
 
 	if (ring->me == 1)
 		target = SOC15_REG_OFFSET(GC, 0, mmCP_ME1_PIPE0_INT_CNTL);
@@ -3413,9 +3409,7 @@ static int gfx_v9_0_kiq_irq(struct amdgpu_device *adev,
 			    struct amdgpu_iv_entry *entry)
 {
 	u8 me_id, pipe_id, queue_id;
-	struct amdgpu_ring *ring = (struct amdgpu_ring *)source->data;
-
-	BUG_ON(!ring || (ring->funcs->type != AMDGPU_RING_TYPE_KIQ));
+	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
 
 	me_id = (entry->ring_id & 0x0c) >> 2;
 	pipe_id = (entry->ring_id & 0x03) >> 0;
-- 
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] 6+ messages in thread

* RE: [PATCH 1/3] drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable.
       [not found] ` <1492498929-19160-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
  2017-04-18  7:02   ` [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in gfx8 Rex Zhu
  2017-04-18  7:02   ` [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9 Rex Zhu
@ 2017-04-18 13:47   ` Deucher, Alexander
  2 siblings, 0 replies; 6+ messages in thread
From: Deucher, Alexander @ 2017-04-18 13:47 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Zhu, Rex

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Tuesday, April 18, 2017 3:02 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zhu, Rex
> Subject: [PATCH 1/3] drm/amdgpu: fix typo in dmesg in
> gfx_v8_0_kiq_kcq_disable.
> 
> Change-Id: I22a7851d4a87028778dfdc18b3da2ed856a8092b
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index d0890ad..5348710 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -1406,6 +1406,7 @@ static int gfx_v8_0_kiq_init_ring(struct
> amdgpu_device *adev,
> 
>  	return r;
>  }
> +
>  static void gfx_v8_0_kiq_free_ring(struct amdgpu_ring *ring,
>  				   struct amdgpu_irq_src *irq)
>  {
> @@ -4744,7 +4745,7 @@ static int gfx_v8_0_kiq_kcq_disable(struct
> amdgpu_device *adev)
>  		DRM_UDELAY(1);
>  	}
>  	if (i >= adev->usec_timeout) {
> -		DRM_ERROR("KCQ enable failed
> (scratch(0x%04X)=0x%08X)\n",
> +		DRM_ERROR("KCQ disabled failed
> (scratch(0x%04X)=0x%08X)\n",
>  			  scratch, tmp);
>  		r = -EINVAL;
>  	}
> --
> 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] 6+ messages in thread

* RE: [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in gfx8.
       [not found]     ` <1492498929-19160-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-18 13:48       ` Deucher, Alexander
  0 siblings, 0 replies; 6+ messages in thread
From: Deucher, Alexander @ 2017-04-18 13:48 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Zhu, Rex

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Tuesday, April 18, 2017 3:02 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zhu, Rex
> Subject: [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in
> gfx8.
> 
> Change-Id: Iab362ad196a3d515e5ac8d9a7c925b0752c96830
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 5348710..563944a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -6827,8 +6827,6 @@ static int gfx_v8_0_kiq_set_interrupt_state(struct
> amdgpu_device *adev,
>  {
>  	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
> 
> -	BUG_ON(ring->funcs->type != AMDGPU_RING_TYPE_KIQ);
> -
>  	switch (type) {
>  	case AMDGPU_CP_KIQ_IRQ_DRIVER0:
>  		WREG32_FIELD(CPC_INT_CNTL, GENERIC2_INT_ENABLE,
> @@ -6858,8 +6856,6 @@ static int gfx_v8_0_kiq_irq(struct amdgpu_device
> *adev,
>  	u8 me_id, pipe_id, queue_id;
>  	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
> 
> -	BUG_ON(ring->funcs->type != AMDGPU_RING_TYPE_KIQ);
> -
>  	me_id = (entry->ring_id & 0x0c) >> 2;
>  	pipe_id = (entry->ring_id & 0x03) >> 0;
>  	queue_id = (entry->ring_id & 0x70) >> 4;
> --
> 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] 6+ messages in thread

* RE: [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9.
       [not found]     ` <1492498929-19160-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-18 13:49       ` Deucher, Alexander
  0 siblings, 0 replies; 6+ messages in thread
From: Deucher, Alexander @ 2017-04-18 13:49 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Zhu, Rex

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Tuesday, April 18, 2017 3:02 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zhu, Rex
> Subject: [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9.
> 
> the system will trigger BUG_ON When amdgpu_fini is called,
> the IRQ source will be cleaned before IRQ uninstalled
> becasue of the sequence of ip_block.
> so not set irq source.
> 
> Change-Id: I64b99247c36edb84bd209905eb24b391720b4d8f
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>

I think Trigger sent the same patch.  Either one is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index f6b2329..84b31a4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -631,7 +631,6 @@ static int gfx_v9_0_kiq_init_ring(struct
> amdgpu_device *adev,
>  		ring->pipe = 1;
>  	}
> 
> -	irq->data = ring;
>  	ring->queue = 0;
>  	ring->eop_gpu_addr = kiq->eop_gpu_addr;
>  	sprintf(ring->name, "kiq %d.%d.%d", ring->me, ring->pipe, ring-
> >queue);
> @@ -647,7 +646,6 @@ static void gfx_v9_0_kiq_free_ring(struct
> amdgpu_ring *ring,
>  {
>  	amdgpu_wb_free(ring->adev, ring->adev->virt.reg_val_offs);
>  	amdgpu_ring_fini(ring);
> -	irq->data = NULL;
>  }
> 
>  /* create MQD for each compute queue */
> @@ -3367,9 +3365,7 @@ static int gfx_v9_0_kiq_set_interrupt_state(struct
> amdgpu_device *adev,
>  					    enum amdgpu_interrupt_state
> state)
>  {
>  	uint32_t tmp, target;
> -	struct amdgpu_ring *ring = (struct amdgpu_ring *)src->data;
> -
> -	BUG_ON(!ring || (ring->funcs->type !=
> AMDGPU_RING_TYPE_KIQ));
> +	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
> 
>  	if (ring->me == 1)
>  		target = SOC15_REG_OFFSET(GC, 0,
> mmCP_ME1_PIPE0_INT_CNTL);
> @@ -3413,9 +3409,7 @@ static int gfx_v9_0_kiq_irq(struct amdgpu_device
> *adev,
>  			    struct amdgpu_iv_entry *entry)
>  {
>  	u8 me_id, pipe_id, queue_id;
> -	struct amdgpu_ring *ring = (struct amdgpu_ring *)source->data;
> -
> -	BUG_ON(!ring || (ring->funcs->type !=
> AMDGPU_RING_TYPE_KIQ));
> +	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
> 
>  	me_id = (entry->ring_id & 0x0c) >> 2;
>  	pipe_id = (entry->ring_id & 0x03) >> 0;
> --
> 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] 6+ messages in thread

end of thread, other threads:[~2017-04-18 13:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18  7:02 [PATCH 1/3] drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable Rex Zhu
     [not found] ` <1492498929-19160-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-04-18  7:02   ` [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in gfx8 Rex Zhu
     [not found]     ` <1492498929-19160-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-04-18 13:48       ` Deucher, Alexander
2017-04-18  7:02   ` [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9 Rex Zhu
     [not found]     ` <1492498929-19160-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-04-18 13:49       ` Deucher, Alexander
2017-04-18 13:47   ` [PATCH 1/3] drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable Deucher, Alexander

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.