All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: skip IB tests for KIQ in general
@ 2018-10-03 15:15 Shirish S
       [not found] ` <1538579711-19601-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Shirish S @ 2018-10-03 15:15 UTC (permalink / raw)
  To: Alexander.Deucher-5C7GfCeVMHo
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Shirish S

From: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>

[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.

Signed-off-by: Shirish S <shirish.s@amd.com>
Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
---

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 47817e0..b8963b7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -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

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

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

* Re: [PATCH] drm/amdgpu: skip IB tests for KIQ in general
       [not found] ` <1538579711-19601-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
@ 2018-10-04  3:51   ` Alex Deucher
  2018-10-04  7:11   ` Christian König
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2018-10-04  3:51 UTC (permalink / raw)
  To: S, Shirish; +Cc: Deucher, Alexander, amd-gfx list

On Wed, Oct 3, 2018 at 11:15 AM Shirish S <shirish.s@amd.com> wrote:
>
> From: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
>
> [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.
>
> Signed-off-by: Shirish S <shirish.s@amd.com>
> Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>

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


> ---
>
> 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(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index 47817e0..b8963b7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -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
>
> _______________________________________________
> 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] 4+ messages in thread

* Re: [PATCH] drm/amdgpu: skip IB tests for KIQ in general
       [not found] ` <1538579711-19601-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
  2018-10-04  3:51   ` Alex Deucher
@ 2018-10-04  7:11   ` Christian König
       [not found]     ` <3d8d4c0a-1a87-a4c4-fee6-da62d6069899-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Christian König @ 2018-10-04  7:11 UTC (permalink / raw)
  To: Shirish S, Alexander.Deucher-5C7GfCeVMHo
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 03.10.2018 um 17:15 schrieb Shirish S:
> From: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
>
> [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.
>
> Signed-off-by: Shirish S <shirish.s@amd.com>
> Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>

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.

> ---
>
> 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(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index 47817e0..b8963b7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -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 ||

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

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

* Re: [PATCH] drm/amdgpu: skip IB tests for KIQ in general
       [not found]     ` <3d8d4c0a-1a87-a4c4-fee6-da62d6069899-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-10-05  5:57       ` S, Shirish
  0 siblings, 0 replies; 4+ messages in thread
From: S, Shirish @ 2018-10-05  5:57 UTC (permalink / raw)
  To: christian.koenig-5C7GfCeVMHo, Shirish S, Alexander.Deucher-5C7GfCeVMHo
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW



On 10/4/2018 12:41 PM, Christian König wrote:
> Am 03.10.2018 um 17:15 schrieb Shirish S:
>> From: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
>>
>> [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.
>>
>> Signed-off-by: Shirish S <shirish.s@amd.com>
>> Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
>
> 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.
> 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
> Otherwise I would say we should fix interrupts on the KIQ and then we 
> also don't need this change any more.
>
> Regards,
> Christian.
>
>> ---
>>
>> 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(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
>> index 47817e0..b8963b7 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
>> @@ -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 ||
>

-- 
Regards,
Shirish S

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

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

end of thread, other threads:[~2018-10-05  5:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 15:15 [PATCH] drm/amdgpu: skip IB tests for KIQ in general Shirish S
     [not found] ` <1538579711-19601-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
2018-10-04  3:51   ` Alex Deucher
2018-10-04  7:11   ` Christian König
     [not found]     ` <3d8d4c0a-1a87-a4c4-fee6-da62d6069899-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-05  5:57       ` S, Shirish

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.