Skip to contentSkip to conversation

drm/amdgpu: skip IB tests for KIQ in general

PATCH In review Shirish S 4 participants 4 messages Oct 3, 2018 – Oct 5, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Shirish S

author
#0 lore raw

PATCH 1/1 drm/amdgpu: skip IB tests for KIQ in general

From: Pratik Vishwakarma <[email protected]>

[Why]
1. We never submit IBs to KIQ.
2. Ring test pass without KIQ's ring also.
3. By skipping we see an improvement of around 500ms in the amdgpu's resume time.

[How]
skip IB tests for KIQ ring type.

---

This patch is a follow-up to the suggestion given by Alex, while reviewing the patch: https://patchwork.freedesktop.org/patch/250912/

-Shirish S

 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +8 -0
index 47817e0..b8963b7 100644
@@ -354,6 +354,14 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
 		if (!ring || !ring->ready)
 			continue;
 
+		/* skip IB tests for KIQ in general for the below reasons:
+		 * 1. We never submit IBs to the KIQ
+		 * 2. KIQ doesn't use the EOP interrupts,
+		 *    we use some other CP interrupt.
+		 */
+		if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+			continue;
+
 		/* MM engine need more time */
 		if (ring->funcs->type == AMDGPU_RING_TYPE_UVD ||
 			ring->funcs->type == AMDGPU_RING_TYPE_VCE ||
Signature · 6 lines
2.7.4

_______________________________________________
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): 1538579711-19601-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 9 lines · Shirish S

From: Pratik Vishwakarma <[email protected]>

[Why]
1. We never submit IBs to KIQ.
2. Ring test pass without KIQ's ring also.
3. By skipping we see an improvement of around 500ms in the amdgpu's resume time.

Quoted 5 lines

[How]
skip IB tests for KIQ ring type.

Quoted 32 lines

---

This patch is a follow-up to the suggestion given by Alex, while reviewing the patch: https://patchwork.freedesktop.org/patch/250912/

(quoted diff) +0 -1
-Shirish S
 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +8 -1
index 47817e0..b8963b7 100644
@@ -354,6 +354,14 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
                if (!ring || !ring->ready)
                        continue;
 
+               /* skip IB tests for KIQ in general for the below reasons:
+                * 1. We never submit IBs to the KIQ
+                * 2. KIQ doesn't use the EOP interrupts,
+                *    we use some other CP interrupt.
+                */
+               if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+                       continue;
+
                /* MM engine need more time */
                if (ring->funcs->type == AMDGPU_RING_TYPE_UVD ||
                        ring->funcs->type == AMDGPU_RING_TYPE_VCE ||
--

2.7.4

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

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

Am 03.10.2018 um 17:15 schrieb Shirish S:

Quoted 8 lines

From: Pratik Vishwakarma <[email protected]>

[Why]
1. We never submit IBs to KIQ.
2. Ring test pass without KIQ's ring also.
3. By skipping we see an improvement of around 500ms in the amdgpu's resume time.

Quoted 5 lines

[How]
skip IB tests for KIQ ring type.

Well I'm not sure if that is a good idea or not.

On the one hand it is true that we never submit IBs to the KIQ, so testing that doesn't make much sense actually.

But on the other hand the 500ms delay during resume points out a problem with the KIQ, e.g. interrupts are not working correctly!

Question is now if we should ignore that problem because we never use interrupts on the KIQ?

If the answer is to keep it as it is we should remove the intterupt handling for the KIQ as well.

Otherwise I would say we should fix interrupts on the KIQ and then we also don't need this change any more.

Regards,
Christian.

Quoted 19 lines

---

This patch is a follow-up to the suggestion given by Alex, while reviewing the patch: https://patchwork.freedesktop.org/patch/250912/

(quoted diff) +0 -1
-Shirish S
 
  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++++++++
  1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1 -0
index 47817e0..b8963b7 100644
@@ -354,6 +354,14 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
  		if (!ring || !ring->ready)
  			continue;
 
+		/* skip IB tests for KIQ in general for the below reasons:

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device *adev) · line 367

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +7 -0
+		 * 1. We never submit IBs to the KIQ
+		 * 2. KIQ doesn't use the EOP interrupts,
+		 *    we use some other CP interrupt.
+		 */
+		if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+			continue;
+
  		/* MM engine need more time */
  		if (ring->funcs->type == AMDGPU_RING_TYPE_UVD ||
  			ring->funcs->type == AMDGPU_RING_TYPE_VCE ||

_______________________________________________
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): 3d8d4c0a-1a87-a4c4-fee6-da62d6069899-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#5 lore raw
Quoted 15 lines · Christian König

Am 03.10.2018 um 17:15 schrieb Shirish S:

Quoted 8 lines

From: Pratik Vishwakarma <[email protected]>

[Why]
1. We never submit IBs to KIQ.
2. Ring test pass without KIQ's ring also.
3. By skipping we see an improvement of around 500ms in the amdgpu's resume time.

Quoted 5 lines

[How]
skip IB tests for KIQ ring type.

Quoted 8 lines

Well I'm not sure if that is a good idea or not.

On the one hand it is true that we never submit IBs to the KIQ, so testing that doesn't make much sense actually.

But on the other hand the 500ms delay during resume points out a problem with the KIQ, e.g. interrupts are not working correctly!

Question is now if we should ignore that problem because we never use interrupts on the KIQ?

Yes Christian,  that's the approach as no point fixing something we never use.

Quoted 2 lines

If the answer is to keep it as it is we should remove the intterupt handling for the KIQ as well.

I have sent a patch that shall remove interrupt handling for KIQ, please review.

Regards,
Shirish S

Quoted 35 lines

Otherwise I would say we should fix interrupts on the KIQ and then we also don't need this change any more.

Regards,
Christian.

Quoted 29 lines

---

This patch is a follow-up to the suggestion given by Alex, while reviewing the patch: https://patchwork.freedesktop.org/patch/250912/

-Shirish S

  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++++++++

  1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0 -0
index 47817e0..b8963b7 100644
@@ -354,6 +354,14 @@ int amdgpu_ib_ring_tests(struct amdgpu_device 
 *adev)
           if (!ring || !ring->ready)
               continue;

  +        /* skip IB tests for KIQ in general for the below reasons:
+         * 1. We never submit IBs to the KIQ
+         * 2. KIQ doesn't use the EOP interrupts,
+         *    we use some other CP interrupt.
+         */
+        if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+            continue;
+
          /* MM engine need more time */
          if (ring->funcs->type == AMDGPU_RING_TYPE_UVD || ring->funcs->type == AMDGPU_RING_TYPE_VCE ||

Signature · 7 lines
Regards,
Shirish S

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