drm/amdgpu:fix amdgpu_sa_bo_new error
Subsystems (2)
PATCH 1/1 drm/amdgpu:fix amdgpu_sa_bo_new error
ib_pool init should prior to fbdev_init, otherwise there will be error from amdgpu_sa_bo_new (amdgpu_sa.c:323)
fbdev_init will call ttm_validate which further call amdgpu_sa_bo_new.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -1918,14 +1918,14 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* Get a log2 for easy divisions. */ adev->mm_stats.log2_max_MBps =ilog2 (max (1u , max_MBps)); -amdgpu_fbdev_init (adev); - r =amdgpu_ib_pool_init (adev);if (r) {dev_err (adev->dev,"IB initialization failed (%d).\n" , r); goto failed; } +amdgpu_fbdev_init (adev); + r =amdgpu_ib_ring_tests (adev);if (r)DRM_ERROR ("ib ring test failed (%d).\n" , r);
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): 1486546917-1464-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
Am 08.02.2017 um 10:41 schrieb Monk Liu:
Quoted 21 lines
ib_poolinit should prior tofbdev_init, otherwise there will be error fromamdgpu_sa_bo_new(amdgpu_sa.c:323)
fbdev_initwill callttm_validatewhich further callamdgpu_sa_bo_new.Change-Id I3a969570d443f61a44f67b0d76b3871ca5c3ea81Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -1918,14 +1918,14 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* Get a log2 for easy divisions. */ adev->mm_stats.log2_max_MBps =ilog2 (max (1u , max_MBps));
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev, · line 1928
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-2-amdgpu_fbdev_init (adev); - r =amdgpu_ib_pool_init (adev);if (r) {dev_err (adev->dev,"IB initialization failed (%d).\n" , r); goto failed; } +amdgpu_fbdev_init (adev); +
As noted internally as well, please more that one more further down behind the call to amdgpu_ib_ring_tests().
With that changed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev, · line 1931
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0r =amdgpu_ib_ring_tests (adev);if (r)DRM_ERROR ("ib ring test failed (%d).\n" , r);
_______________________________________________
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): 4ac7f30d-fde6-b1e3-e5de-fc518b180548-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Quoted 27 lines · Christian König
Am 08.02.2017 um 10:41 schrieb Monk Liu:
Quoted 26 lines
ib_poolinit should prior tofbdev_init, otherwise there will be error fromamdgpu_sa_bo_new(amdgpu_sa.c:323)
fbdev_initwill callttm_validatewhich further callamdgpu_sa_bo_new.Change-Id I3a969570d443f61a44f67b0d76b3871ca5c3ea81Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-1@@ -1918,14 +1918,14 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* Get a log2 for easy divisions. */ adev->mm_stats.log2_max_MBps =ilog2 (max (1u , max_MBps)); -amdgpu_fbdev_init (adev); - r =amdgpu_ib_pool_init (adev);if (r) {
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev, · line 1928
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0dev_err (adev->dev,"IB initialization failed (%d).\n" , r); goto failed; } +amdgpu_fbdev_init (adev); +As noted internally as well, please more that one more further down behind the call to
amdgpu_ib_ring_tests().
If I understand correctly, that could result in no console output in the worst case if there's trouble with the ring & IB tests? That doesn't seem very good.
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): a2254528-29ca-44bb-8cb9-09fd428af241-otUistvHUpPR7s880joybQ@public.gmane.org
yeah, make sense
@Christian, why move fbdev_init() further down after ib test ? any consideration ?
________________________________
发件人: Michel Dänzer <[email protected]>
发送时间: 2017年2月8日 23:19:23
收件人: Christian König; Liu, Monk
抄送: [email protected]
主题: Re: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error
Quoted 27 lines · Christian König
Am 08.02.2017 um 10:41 schrieb Monk Liu:
Quoted 26 lines
ib_poolinit should prior tofbdev_init, otherwise there will be error fromamdgpu_sa_bo_new(amdgpu_sa.c:323)
fbdev_initwill callttm_validatewhich further callamdgpu_sa_bo_new.Change-Id I3a969570d443f61a44f67b0d76b3871ca5c3ea81Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-1@@ -1918,14 +1918,14 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* Get a log2 for easy divisions. */ adev->mm_stats.log2_max_MBps =ilog2 (max (1u , max_MBps)); -amdgpu_fbdev_init (adev); - r =amdgpu_ib_pool_init (adev);if (r) {
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev, · line 1928
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0dev_err (adev->dev,"IB initialization failed (%d).\n" , r); goto failed; } +amdgpu_fbdev_init (adev); +As noted internally as well, please more that one more further down behind the call to
amdgpu_ib_ring_tests().
If I understand correctly, that could result in no console output in the worst case if there's trouble with the ring & IB tests? That doesn't seem very good.
--
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): DM5PR12MB161067C1383FC5829F4FCD8984420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
The IB test make the decision if the hardware is working or not.
So they should be the first commands (except for the ring tests) we send to the hardware.
When we allocate the fb before the test we send the clear command to the hardware without knowing if the hardware really works or not.
Not a big issue, but I think the order makes more sense that way.
Regards,
Christian.
Am 08.02.2017 um 16:21 schrieb Liu, Monk:
Quoted 49 lines
yeah, make sense
@Christian, why move
fbdev_init()further down after ib test ? any consideration ?------------------------------------------------------------------------
*发件人:* Michel Dänzer <[email protected]> *发送时间:* 2017年2月8日 23:19:23
*收件人:* Christian König; Liu, Monk
*抄送:* [email protected] *主题:* Re: [PATCH] drm/amdgpu:fixamdgpu_sa_bo_newerrorQuoted 27 lines · Christian König
Am 08.02.2017 um 10:41 schrieb Monk Liu:
Quoted 26 lines
ib_poolinit should prior tofbdev_init, otherwise there will be error fromamdgpu_sa_bo_new(amdgpu_sa.c:323)
fbdev_initwill callttm_validatewhich further callamdgpu_sa_bo_new.Change-Id I3a969570d443f61a44f67b0d76b3871ca5c3ea81Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-1@@ -1918,14 +1918,14 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* Get a log2 for easy divisions. */ adev->mm_stats.log2_max_MBps =ilog2 (max (1u , max_MBps)); -amdgpu_fbdev_init (adev); - r =amdgpu_ib_pool_init (adev);if (r) {Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device · line 1928
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0dev_err (adev->dev,"IB initialization failed (%d).\n" , r); goto failed; } +amdgpu_fbdev_init (adev); +As noted internally as well, please more that one more further down behind the call to
amdgpu_ib_ring_tests().
Quoted 14 lines
If I understand correctly, that could result in no console output in the worst case if there's trouble with the ring & IB tests? That doesn't seem very good.
Signature · 8 lines
Earthling Michel Dänzer | http://www.amd.com <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
_______________________________________________
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): c4776332-809a-da57-88a9-172b72743ede-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Quoted 9 lines · Christian König
The IB test make the decision if the hardware is working or not.
So they should be the first commands (except for the ring tests) we send to the hardware.
When we allocate the fb before the test we send the clear command to the hardware without knowing if the hardware really works or not.
Not a big issue, but I think the order makes more sense that way.
I just wonder if it's worth all the trouble, just to clear the fbcon buffer[0], if the result is that the console output is delayed, possibly indefinitely.
[0] We don't have any other hardware acceleration for fbcon, so its BO is only accessed by the CPU and display hardware after this, and has to be pinned in the CPU visible area of VRAM at all times anyway.
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): 99ba2b49-6409-0a47-1bc1-f873d69a58d8-otUistvHUpPR7s880joybQ@public.gmane.org
agreed, why not just use cpu to clear it ? is it because performance ?
________________________________
发件人: Michel Dänzer <[email protected]>
发送时间: 2017年2月8日 23:52:02
收件人: Christian König; Liu, Monk
抄送: [email protected]
主题: Re: 答复: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error
Quoted 9 lines · Christian König
The IB test make the decision if the hardware is working or not.
So they should be the first commands (except for the ring tests) we send to the hardware.
When we allocate the fb before the test we send the clear command to the hardware without knowing if the hardware really works or not.
Not a big issue, but I think the order makes more sense that way.
I just wonder if it's worth all the trouble, just to clear the fbcon buffer[0], if the result is that the console output is delayed, possibly indefinitely.
[0] We don't have any other hardware acceleration for fbcon, so its BO is only accessed by the CPU and display hardware after this, and has to be pinned in the CPU visible area of VRAM at all times anyway.
--
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): DM5PR12MB1610D9A7A6D35390193ED57D84420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Am 08.02.2017 um 16:53 schrieb Liu, Monk:
Quoted 3 lines
agreed, why not just use cpu to clear it ? is it because performance ?
Pixel Ding removed the CPU clear because "There's a failure caused by this is that handshaking gets timeout of SRIOV virtual function."
I can only assume that this is really adding to much delay at bootup.
Quoted 12 lines
------------------------------------------------------------------------
*发件人:* Michel Dänzer <[email protected]> *发送时间:* 2017年2月8日 23:52:02
*收件人:* Christian König; Liu, Monk
*抄送:* [email protected] *主题:* Re: 答复: [PATCH] drm/amdgpu:fixamdgpu_sa_bo_newerrorQuoted 5 lines · Christian König
The IB test make the decision if the hardware is working or not.
So they should be the first commands (except for the ring tests) we send to the hardware.
Quoted 8 lines
Quoted 4 lines
When we allocate the fb before the test we send the clear command to the hardware without knowing if the hardware really works or not.
Not a big issue, but I think the order makes more sense that way.
I just wonder if it's worth all the trouble, just to clear the fbcon buffer[0], if the result is that the console output is delayed, possibly indefinitely.
Actually that change is quite beneficial because the IB tests where usually revealing any problem.
Not 100% sure, but when we initialize the fb later that might actually allow us to better track such problems down.
Going to check that,
Christian.
Quoted 9 lines
[0] We don't have any other hardware acceleration for fbcon, so its BO is only accessed by the CPU and display hardware after this, and has to be pinned in the CPU visible area of VRAM at all times anyway.
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com <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): c275b812-8c58-0410-16ad-b038e9213fa1-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
that's because some customer modified QEMU and trap each VF's memory access, which cost too much time if using CPU access FB,
emmm, I guess we have no better choice by far, do as you suggested,
to kill risk the negative effect that we may have no console if ib test failed, I suggest we don't block driver proceeding after ib test failure detected , doable ?
________________________________
发件人: Christian König <[email protected]> 发送时间: 2017年2月8日 23:59:10
收件人: Liu, Monk; Michel Dänzer
抄送: [email protected]
主题: Re: 答复: 答复: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error
Am 08.02.2017 um 16:53 schrieb Liu, Monk:
agreed, why not just use cpu to clear it ? is it because performance ?
Pixel Ding removed the CPU clear because "There's a failure caused by this is that handshaking gets timeout of SRIOV virtual function."
I can only assume that this is really adding to much delay at bootup.
________________________________
发件人: Michel Dänzer <[email protected]><mailto:[email protected]> 发送时间: 2017年2月8日 23:52:02
收件人: Christian König; Liu, Monk
抄送: [email protected]<mailto:[email protected]> 主题: Re: 答复: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error
Quoted 9 lines · Christian König
The IB test make the decision if the hardware is working or not.
So they should be the first commands (except for the ring tests) we send to the hardware.
When we allocate the fb before the test we send the clear command to the hardware without knowing if the hardware really works or not.
Not a big issue, but I think the order makes more sense that way.
I just wonder if it's worth all the trouble, just to clear the fbcon buffer[0], if the result is that the console output is delayed, possibly indefinitely.
Actually that change is quite beneficial because the IB tests where usually revealing any problem.
Not 100% sure, but when we initialize the fb later that might actually allow us to better track such problems down.
Going to check that,
Christian.
[0] We don't have any other hardware acceleration for fbcon, so its BO is only accessed by the CPU and display hardware after this, and has to be pinned in the CPU visible area of VRAM at all times anyway.
--
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