drm/amdgpu:fix amdgpu_sa_bo_new error(v2)
Subsystems (2)
PATCH 1/2 drm/amdgpu:fix amdgpu_sa_bo_new error(v2)
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.
v2:
move fbdev_init behind ib test.
--- 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,8 +1918,6 @@ 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);
@@ -1930,6 +1928,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,if (r)DRM_ERROR ("ib ring test failed (%d).\n" , r); +amdgpu_fbdev_init (adev); + r =amdgpu_gem_debugfs_init (adev);if (r) {DRM_ERROR ("registering gem debugfs 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): 1486612206-2379-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu:cleanup
1)remove braces not needed
2)don't return failure on debugfs_firmware_init failed
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -7
@@ -1931,20 +1931,16 @@ int amdgpu_device_init(struct amdgpu_device *adev,amdgpu_fbdev_init (adev); r =amdgpu_gem_debugfs_init (adev); -if (r) { +if (r)DRM_ERROR ("registering gem debugfs failed (%d).\n" , r); - } r =amdgpu_debugfs_regs_init (adev); -if (r) { +if (r)DRM_ERROR ("registering register debugfs failed (%d).\n" , r); - } r =amdgpu_debugfs_firmware_init (adev); -if (r) { +if (r)DRM_ERROR ("registering firmware debugfs failed (%d).\n" , r); -return r; - }if ((amdgpu_testing &1 )) {if (adev->accel_working)
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): 1486612206-2379-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 2/2] drm/amdgpu:cleanup
Quoted 10 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Monk Liu
Sent: Wednesday, February 08, 2017 10:50 PM
To: [email protected]
Cc: Liu, Monk
Subject: [PATCH 2/2] drm/amdgpu:cleanup1)remove braces not needed
2)don't return failure ondebugfs_firmware_initfailed
I'd split these in two, one that is pure cleanup, and the second which drops the early return. With that fixed:
Quoted 41 lines
Change-Id I90ec3197184d0fdda54575bfbad7b705aa178698Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-7@@ -1931,20 +1931,16 @@ int amdgpu_device_init(struct amdgpu_device *adev,amdgpu_fbdev_init (adev); r =amdgpu_gem_debugfs_init (adev); -if (r) { +if (r)DRM_ERROR ("registering gem debugfs failed (%d).\n" , r); - } r =amdgpu_debugfs_regs_init (adev); -if (r) { +if (r)DRM_ERROR ("registering register debugfs failed (%d).\n" , r); - } r =amdgpu_debugfs_firmware_init (adev); -if (r) { +if (r)DRM_ERROR ("registering firmware debugfs failed (%d).\n" , r); -return r; - }drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-1if ((amdgpu_testing &1 )) {if (adev->accel_working) --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
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 14 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Monk Liu
Sent: Wednesday, February 08, 2017 10:50 PM
To: [email protected]
Cc: Liu, Monk
Subject: [PATCH 1/2] drm/amdgpu:fixamdgpu_sa_bo_newerror(v2)
ib_poolinit should prior tofbdev_init, otherwise there will be error fromamdgpu_sa_bo_new(amdgpu_sa.c:323)
Quoted 8 lines
fbdev_initwill callttm_validatewhich further callamdgpu_sa_bo_new.v2:
movefbdev_initbehind ib test.Change-Id I3a969570d443f61a44f67b0d76b3871ca5c3ea81Signed-off-by Monk Liu <[email protected]>
Quoted 32 lines
--- 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
-2@@ -1918,8 +1918,6 @@ 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) {drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0dev_err (adev->dev,"IB initialization failed (%d).\n" , r);@@ -1930,6 +1928,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, if (r)DRM_ERROR ("ib ring test failed (%d).\n" , r); +amdgpu_fbdev_init (adev); + r =amdgpu_gem_debugfs_init (adev);if (r) {
DRM_ERROR("registering gem debugfs failed (%d).\n", r);
--
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