drm/amdgpu: use queue 0 for kiq ring
Subsystems (2)
PATCH 1/1 drm/amdgpu: use queue 0 for kiq ring
It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN only can be issued on queue 0.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +6 -2
@@ -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 ;
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): 1516628738-16083-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 6 lines · 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 <[email protected]>Acked-by Hawking Zhang <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Quoted 26 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +6
-3@@ -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
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
Quoted 15 lines · 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 <[email protected]>Acked-by Hawking Zhang <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev, · line 183
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +2
-2@@ -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
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev, · line 190
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +4
-0+* 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
[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): aaf8651b-6165-19b5-5508-4f3cba3f1e85-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 24 lines · Andres Rodriguez
Quoted 21 lines · 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 <[email protected]>Acked-by Hawking Zhang <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +0
-0@@ -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);
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +2
-1- /* 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
Quoted 11 lines
Regards,
Andresdrivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev, · line 190
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +1
-0+* 2. It must use queue id 0, because CGPG_IDLE/SAVE/LOAD/RUN
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +3
-0+* only can be issued on queue 0. +*/ +if ((mec ==1 && pipe >1 ) || queue !=0 )continue ; ring->me = mec +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
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
Quoted 19 lines · 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 <[email protected]>Acked-by Hawking Zhang <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +0
-1@@ -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 */
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev, · line 190
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +6
-1-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
[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): ef29adff-9d94-9381-71ea-fcbda0ec48b5-5C7GfCeVMHo@public.gmane.org
Quoted 5 lines · Felix
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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx