Skip to contentSkip to conversation

amd-gfx Digest, Vol 13, Issue 29

DISCUSSION Xie, AlexBin 4 participants 6 messages Jun 5, 2017 – Jun 7, 2017 6 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): mailman.49.1496664003.4485.amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org

#2 lore raw

Hi, Tom,

You have found a bug.

Your patch looks fine for me.

Have you confirmed the deleted part is older version? Perhaps search email list or git history to confirm?

Alex Bin Xie

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of [email protected]
Sent: Monday, June 5, 2017 8:00 AM
To: [email protected]
Subject: amd-gfx Digest, Vol 13, Issue 29

Send amd-gfx mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
or, via email, send a message with subject or body 'help' to
[email protected]

You can reach the person managing the list at
[email protected]

When replying, please edit your Subject line so it is more specific than "Re: Contents of amd-gfx digest..."

Today's Topics:

1. [PATCH] drm/amd/amdgpu: Fix ring initialization for GFX9 (Tom St Denis)

----------------------------------------------------------------------

Message: 1
Date: Mon, 5 Jun 2017 07:46:01 -0400
From: Tom St Denis <[email protected]>
To: [email protected]
Cc: Tom St Denis <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: Fix ring initialization for GFX9
Message-ID: <[email protected]>
Content-Type: text/plain

The commit 83866f0fc72017d55f40cbd4160cd1e42a2cc3a8 erroneously included the old ring init sequence along with the new one which uses shared header definitions.

The fix which works on my vega10 seems to be to drop the old init sequence.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -26
index 9502353ec325..8388893e0b11 100644
@@ -1586,32 +1586,6 @@ static int gfx_v9_0_sw_init(void *handle)
 		ring_id++;
 	}
 
-	/* set up the compute queues */
-	for (i = 0, ring_id = 0; i < AMDGPU_MAX_COMPUTE_QUEUES; i++) {
-		unsigned irq_type;
-
-		/* max 32 queues per MEC */
-		if ((i >= 32) || (i >= AMDGPU_MAX_COMPUTE_RINGS)) {
-			DRM_ERROR("Too many (%d) compute rings!\n", i);
-			break;
-		}
-		ring = &adev->gfx.compute_ring[i];
-		ring->ring_obj = NULL;
-		ring->use_doorbell = true;
-		ring->doorbell_index = (AMDGPU_DOORBELL64_MEC_RING0 + i) << 1;
-		ring->me = 1; /* first MEC */
-		ring->pipe = i / 8;
-		ring->queue = i % 8;
-		ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr + (i * GFX9_MEC_HPD_SIZE);
-		sprintf(ring->name, "comp_%d.%d.%d", ring->me, ring->pipe, ring->queue);
-		irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP + ring->pipe;
-		/* type-2 packets are deprecated on MEC, use type-3 instead */
-		r = amdgpu_ring_init(adev, ring, 1024,
-				     &adev->gfx.eop_irq, irq_type);
-		if (r)
-			return r;
-	}
-
 	r = gfx_v9_0_kiq_init(adev);
 	if (r) {
 		DRM_ERROR("Failed to init KIQ BOs!\n");
Signature · 22 lines
2.12.0



------------------------------

Subject: Digest Footer

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


------------------------------

End of amd-gfx Digest, Vol 13, Issue 29
***************************************
_______________________________________________
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): DM5PR12MB1257EE5D5ADFC07338381436F2CA0-2J9CzHegvk/[email protected]

#4 lore raw
Quoted 7 lines · AlexBin

Hi, Tom,

You have found a bug.

Your patch looks fine for me.

Have you confirmed the deleted part is older version? Perhaps search email list or git history to confirm?

It looks like the edits to the older GFX files (7/8) simply changed that block of code whereas the gfx9 version they pasted in the fixed block moving the old block down.

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

#5 lore raw
In reply to a message not in the archive

Hi Tom,

I have found the original patch which introduce the duplicate code.

The patch is in:
amd-gfx Digest, Vol 11, Issue 301

Alex Bin Xie

-----Original Message-----
From: Xie, AlexBin
Sent: Monday, June 5, 2017 10:25 AM
To: [email protected]
Subject: RE: amd-gfx Digest, Vol 13, Issue 29

Hi, Tom,

You have found a bug.

Your patch looks fine for me.

Have you confirmed the deleted part is older version? Perhaps search email list or git history to confirm?

Alex Bin Xie

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of [email protected]
Sent: Monday, June 5, 2017 8:00 AM
To: [email protected]
Subject: amd-gfx Digest, Vol 13, Issue 29

Send amd-gfx mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
or, via email, send a message with subject or body 'help' to
[email protected]

You can reach the person managing the list at
[email protected]

When replying, please edit your Subject line so it is more specific than "Re: Contents of amd-gfx digest..."

Today's Topics:

1. [PATCH] drm/amd/amdgpu: Fix ring initialization for GFX9 (Tom St Denis)

----------------------------------------------------------------------

Message: 1
Date: Mon, 5 Jun 2017 07:46:01 -0400
From: Tom St Denis <[email protected]>
To: [email protected]
Cc: Tom St Denis <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: Fix ring initialization for GFX9
Message-ID: <[email protected]>
Content-Type: text/plain

The commit 83866f0fc72017d55f40cbd4160cd1e42a2cc3a8 erroneously included the old ring init sequence along with the new one which uses shared header definitions.

The fix which works on my vega10 seems to be to drop the old init sequence.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -26
index 9502353ec325..8388893e0b11 100644
@@ -1586,32 +1586,6 @@ static int gfx_v9_0_sw_init(void *handle)
 		ring_id++;
 	}
 
-	/* set up the compute queues */
-	for (i = 0, ring_id = 0; i < AMDGPU_MAX_COMPUTE_QUEUES; i++) {
-		unsigned irq_type;
-
-		/* max 32 queues per MEC */
-		if ((i >= 32) || (i >= AMDGPU_MAX_COMPUTE_RINGS)) {
-			DRM_ERROR("Too many (%d) compute rings!\n", i);
-			break;
-		}
-		ring = &adev->gfx.compute_ring[i];
-		ring->ring_obj = NULL;
-		ring->use_doorbell = true;
-		ring->doorbell_index = (AMDGPU_DOORBELL64_MEC_RING0 + i) << 1;
-		ring->me = 1; /* first MEC */
-		ring->pipe = i / 8;
-		ring->queue = i % 8;
-		ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr + (i * GFX9_MEC_HPD_SIZE);
-		sprintf(ring->name, "comp_%d.%d.%d", ring->me, ring->pipe, ring->queue);
-		irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP + ring->pipe;
-		/* type-2 packets are deprecated on MEC, use type-3 instead */
-		r = amdgpu_ring_init(adev, ring, 1024,
-				     &adev->gfx.eop_irq, irq_type);
-		if (r)
-			return r;
-	}
-
 	r = gfx_v9_0_kiq_init(adev);
 	if (r) {
 		DRM_ERROR("Failed to init KIQ BOs!\n");
Signature · 22 lines
2.12.0



------------------------------

Subject: Digest Footer

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


------------------------------

End of amd-gfx Digest, Vol 13, Issue 29
***************************************
_______________________________________________
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): DM5PR12MB1257678F0DC8C1E61D72A935F2CA0-2J9CzHegvk/[email protected]

#7 lore raw
Quoted 5 lines · AlexBin

I have found the original patch which introduce the duplicate code.

The patch is in:
amd-gfx Digest, Vol 11, Issue 301

FYI, such a reference is useless for people who aren't subscribed to the list in digest mode (which is presumably the majority). Better look it up either in patchwork:

https://patchwork.freedesktop.org/project/amd-xorg-ddx/patches/

or in the list archives:

https://lists.freedesktop.org/archives/amd-gfx/2017-June/thread.html

and reference its URL there.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
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): ee56067b-e573-78fb-4194-886ccd1eccf9-otUistvHUpPR7s880joybQ@public.gmane.org

#9 lore raw

Hi Michel,

Thanks.

As I work more for open source driver, this digest mode becomes more annoying.

I didn't even know that amd-gfx can send individual emails to me. As a result, I did not know how to ask correct question about my puzzling. I did ask around once.

Now I wondered how I enabled the digest mode. I think we should disable this option. I am thinking there are other victims of this digest mode.

Alex Bin

Quoted 9 lines · Michel Dänzer
Quoted 4 lines · AlexBin

I have found the original patch which introduce the duplicate code.

The patch is in:
amd-gfx Digest, Vol 11, Issue 301

FYI, such a reference is useless for people who aren't subscribed to the list in digest mode (which is presumably the majority). Better look it up either in patchwork:

Quoted 9 lines

https://patchwork.freedesktop.org/project/amd-xorg-ddx/patches/

or in the list archives:

https://lists.freedesktop.org/archives/amd-gfx/2017-June/thread.html

and reference its URL there.

_______________________________________________
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): 40aeb3b8-97e7-fdc8-51b4-34243f51e8ad-5C7GfCeVMHo@public.gmane.org

#11 lore raw

Hi Alex,

Quoted 9 lines

As I work more for open source driver, this digest mode becomes more annoying.

I didn't even know that amd-gfx can send individual emails to me. As a result, I did not know how to ask correct question about my puzzling. I did ask around once.

Now I wondered how I enabled the digest mode. I think we should disable this option. I am thinking there are other victims of this digest mode.

Digest mode is disabled by default, it has to be enabled explicitly by the subscriber. I don't want to disable digest mode completely for the list, it can be useful for people who just want to read the list, not post to it.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx