All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: use queue 0 for kiq ring
@ 2018-01-22 13:45 Huang Rui
       [not found] ` <1516628738-16083-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Huang Rui @ 2018-01-22 13:45 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Huang Rui

It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN only can be issued on
queue 0.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index ef04336..0cfb939 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -179,8 +179,12 @@ static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev,
 
 		amdgpu_gfx_bit_to_queue(adev, queue_bit, &mec, &pipe, &queue);
 
-		/* Using pipes 2/3 from MEC 2 seems cause problems */
-		if (mec == 1 && pipe > 1)
+		/*
+		 * 1. Using pipes 2/3 from MEC 2 seems cause problems.
+		 * 2. It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN
+		 * only can be issued on queue 0.
+		 */
+		if ((mec == 1 && pipe > 1) || queue != 0)
 			continue;
 
 		ring->me = mec + 1;
-- 
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] 6+ messages in thread

* Re: [PATCH] drm/amdgpu: use queue 0 for kiq ring
       [not found] ` <1516628738-16083-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
@ 2018-01-22 15:19   ` Alex Deucher
  2018-01-22 17:53   ` Andres Rodriguez
  2018-01-22 22:28   ` Felix Kuehling
  2 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2018-01-22 15:19 UTC (permalink / raw)
  To: Huang Rui; +Cc: Alex Deucher, amd-gfx list

On Mon, Jan 22, 2018 at 8:45 AM, Huang Rui <ray.huang@amd.com> wrote:
> It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN only can be issued on
> queue 0.
>
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index ef04336..0cfb939 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> @@ -179,8 +179,12 @@ static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev,
>
>                 amdgpu_gfx_bit_to_queue(adev, queue_bit, &mec, &pipe, &queue);
>
> -               /* Using pipes 2/3 from MEC 2 seems cause problems */
> -               if (mec == 1 && pipe > 1)
> +               /*
> +                * 1. Using pipes 2/3 from MEC 2 seems cause problems.
> +                * 2. It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN
> +                * only can be issued on queue 0.
> +                */
> +               if ((mec == 1 && pipe > 1) || queue != 0)
>                         continue;
>
>                 ring->me = mec + 1;
> --
> 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] 6+ messages in thread

* Re: [PATCH] drm/amdgpu: use queue 0 for kiq ring
       [not found] ` <1516628738-16083-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
  2018-01-22 15:19   ` Alex Deucher
@ 2018-01-22 17:53   ` Andres Rodriguez
       [not found]     ` <aaf8651b-6165-19b5-5508-4f3cba3f1e85-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2018-01-22 22:28   ` Felix Kuehling
  2 siblings, 1 reply; 6+ messages in thread
From: Andres Rodriguez @ 2018-01-22 17:53 UTC (permalink / raw)
  To: Huang Rui, Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: andresx7-Re5JQEeQqe8AvxtiuMwx3w



On 2018-01-22 08:45 AM, Huang Rui wrote:
> It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN only can be issued on
> queue 0.
> 
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index ef04336..0cfb939 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> @@ -179,8 +179,12 @@ static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev,
>   
>   		amdgpu_gfx_bit_to_queue(adev, queue_bit, &mec, &pipe, &queue);
>   
> -		/* Using pipes 2/3 from MEC 2 seems cause problems */
> -		if (mec == 1 && pipe > 1)
> +		/*
> +		 * 1. Using pipes 2/3 from MEC 2 seems cause problems.'

Could this have been related to #2? Should we just simplify this by 
guaranteeing KIQ MEC[0] PIPE[0] QUEUE[0]?

Regards,
Andres

> +		 * 2. It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN
> +		 * only can be issued on queue 0.
> +		 */
> +		if ((mec == 1 && pipe > 1) || queue != 0)
>   			continue;
>   
>   		ring->me = mec + 1;
> 
_______________________________________________
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] drm/amdgpu: use queue 0 for kiq ring
       [not found]     ` <aaf8651b-6165-19b5-5508-4f3cba3f1e85-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-01-22 20:49       ` Alex Deucher
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2018-01-22 20:49 UTC (permalink / raw)
  To: Andres Rodriguez; +Cc: Alex Deucher, Huang Rui, amd-gfx list

On Mon, Jan 22, 2018 at 12:53 PM, Andres Rodriguez <andresx7@gmail.com> wrote:
>
>
> On 2018-01-22 08:45 AM, Huang Rui wrote:
>>
>> It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN only can be issued
>> on
>> queue 0.
>>
>> Signed-off-by: Huang Rui <ray.huang@amd.com>
>> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
>> index ef04336..0cfb939 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
>> @@ -179,8 +179,12 @@ static int amdgpu_gfx_kiq_acquire(struct
>> amdgpu_device *adev,
>>                 amdgpu_gfx_bit_to_queue(adev, queue_bit, &mec, &pipe,
>> &queue);
>>   -             /* Using pipes 2/3 from MEC 2 seems cause problems */
>> -               if (mec == 1 && pipe > 1)
>> +               /*
>> +                * 1. Using pipes 2/3 from MEC 2 seems cause problems.'
>
>
> Could this have been related to #2? Should we just simplify this by
> guaranteeing KIQ MEC[0] PIPE[0] QUEUE[0]?
>

It's possible.  Other OSes use a hardcoded config for KIQ so there may
be corner cases we never validated when using a non-standard config.

Alex

> Regards,
> Andres
>
>> +                * 2. It must use queue id 0, because
>> CGPG_IDLE/SAVE/LOAD/RUN
>> +                * only can be issued on queue 0.
>> +                */
>> +               if ((mec == 1 && pipe > 1) || queue != 0)
>>                         continue;
>>                 ring->me = mec + 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] drm/amdgpu: use queue 0 for kiq ring
       [not found] ` <1516628738-16083-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
  2018-01-22 15:19   ` Alex Deucher
  2018-01-22 17:53   ` Andres Rodriguez
@ 2018-01-22 22:28   ` Felix Kuehling
       [not found]     ` <ef29adff-9d94-9381-71ea-fcbda0ec48b5-5C7GfCeVMHo@public.gmane.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Felix Kuehling @ 2018-01-22 22:28 UTC (permalink / raw)
  To: Huang Rui, Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

KFD currently hard-codes MEC2, Pipe0, Queue0 for the HIQ. (For some
reason KFD numbers MECs starting from 1, not 0.)

So that narrows your choice for KIQ on MEC2 down to pipe == 1, queue == 0.

Regards,
  Felix


On 2018-01-22 08:45 AM, Huang Rui wrote:
> It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN only can be issued on
> queue 0.
>
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index ef04336..0cfb939 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> @@ -179,8 +179,12 @@ static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev,
>  
>  		amdgpu_gfx_bit_to_queue(adev, queue_bit, &mec, &pipe, &queue);
>  
> -		/* Using pipes 2/3 from MEC 2 seems cause problems */
> -		if (mec == 1 && pipe > 1)
> +		/*
> +		 * 1. Using pipes 2/3 from MEC 2 seems cause problems.
> +		 * 2. It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN
> +		 * only can be issued on queue 0.
> +		 */
> +		if ((mec == 1 && pipe > 1) || queue != 0)
>  			continue;
>  
>  		ring->me = mec + 1;

_______________________________________________
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] drm/amdgpu: use queue 0 for kiq ring
       [not found]     ` <ef29adff-9d94-9381-71ea-fcbda0ec48b5-5C7GfCeVMHo@public.gmane.org>
@ 2018-01-23  1:11       ` Huang Rui
  0 siblings, 0 replies; 6+ messages in thread
From: Huang Rui @ 2018-01-23  1:11 UTC (permalink / raw)
  To: Kuehling, Felix
  Cc: Deucher, Alexander, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Tue, Jan 23, 2018 at 06:28:52AM +0800, Kuehling, Felix wrote:
> KFD currently hard-codes MEC2, Pipe0, Queue0 for the HIQ. (For some
> reason KFD numbers MECs starting from 1, not 0.)
> 
> So that narrows your choice for KIQ on MEC2 down to pipe == 1, queue == 0.
> 

Yes, actually, we use mec2 pipe1 queue0 for KIQ at current for this patch.

Thanks
Ray
_______________________________________________
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:[~2018-01-23  1:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 13:45 [PATCH] drm/amdgpu: use queue 0 for kiq ring Huang Rui
     [not found] ` <1516628738-16083-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-01-22 15:19   ` Alex Deucher
2018-01-22 17:53   ` Andres Rodriguez
     [not found]     ` <aaf8651b-6165-19b5-5508-4f3cba3f1e85-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-22 20:49       ` Alex Deucher
2018-01-22 22:28   ` Felix Kuehling
     [not found]     ` <ef29adff-9d94-9381-71ea-fcbda0ec48b5-5C7GfCeVMHo@public.gmane.org>
2018-01-23  1:11       ` Huang Rui

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.