Skip to contentSkip to conversation

drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable.

PATCH In review Rex Zhu 2 participants 6 messages Apr 18, 2017 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/3 drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable.

Change-Id I22a7851d4a87028778dfdc18b3da2ed856a8092b
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -1
index d0890ad..5348710 100644
@@ -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;
 	}
Signature · 6 lines
1.9.1

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

A message that is not in the archive (sent off-list or not yet received): 1492498929-19160-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/3 drm/amdgpu: delete reduant kiq irq funcs type check in gfx8.

Change-Id Iab362ad196a3d515e5ac8d9a7c925b0752c96830
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -4
index 5348710..563944a 100644
@@ -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;
Signature · 6 lines
1.9.1

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

A message that is not in the archive (sent off-list or not yet received): 1492498929-19160-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#4 lore raw

RE: [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in gfx8.

Quoted 11 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, April 18, 2017 3:02 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 2/3] drm/amdgpu: delete reduant kiq irq funcs type check in gfx8.

Change-Id Iab362ad196a3d515e5ac8d9a7c925b0752c96830
Quoted 32 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -2
index 5348710..563944a 100644
@@ -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:
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -2
 		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

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

author
#5 lore raw

PATCH 3/3 drm/amdgpu: not set KIQ IRQ source in gfx_v9.

In reply to a message not in the archive

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
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -8
index f6b2329..84b31a4 100644
@@ -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;
Signature · 6 lines
1.9.1

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

A message that is not in the archive (sent off-list or not yet received): 1492498929-19160-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#7 lore raw

RE: [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9.

Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, April 18, 2017 3:02 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 3/3] drm/amdgpu: not set KIQ IRQ source in gfx_v9.

Quoted 7 lines

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

I think Trigger sent the same patch. Either one is:

Quoted 59 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -1
index f6b2329..84b31a4 100644
@@ -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-

Quoted 1 line

queue);

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -1
@@ -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 */

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -3
@@ -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);
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -0
 	if (ring->me == 1)
 		target = SOC15_REG_OFFSET(GC, 0,

mmCP_ME1_PIPE0_INT_CNTL);

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -3
@@ -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);
 
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -1
 	me_id = (entry->ring_id & 0x0c) >> 2;
 	pipe_id = (entry->ring_id & 0x03) >> 0;
--

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 Alex Deucher
#8 lore raw
In reply to a message not in the archive
Quoted 11 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, April 18, 2017 3:02 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 1/3] drm/amdgpu: fix typo in dmesg in gfx_v8_0_kiq_kcq_disable.

Change-Id I22a7851d4a87028778dfdc18b3da2ed856a8092b
Quoted 33 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
index d0890ad..5348710 100644
@@ -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)

{

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
@@ -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",
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -1
 			  scratch, tmp);
 		r = -EINVAL;
 	}
--

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