Commit 9bc92b9c authored by Monk Liu's avatar Monk Liu Committed by Alex Deucher

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.
Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent edcafc02
...@@ -1835,8 +1835,6 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -1835,8 +1835,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
/* Get a log2 for easy divisions. */ /* Get a log2 for easy divisions. */
adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps)); adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps));
amdgpu_fbdev_init(adev);
r = amdgpu_ib_pool_init(adev); r = amdgpu_ib_pool_init(adev);
if (r) { if (r) {
dev_err(adev->dev, "IB initialization failed (%d).\n", r); dev_err(adev->dev, "IB initialization failed (%d).\n", r);
...@@ -1847,6 +1845,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -1847,6 +1845,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,
if (r) if (r)
DRM_ERROR("ib ring test failed (%d).\n", r); DRM_ERROR("ib ring test failed (%d).\n", r);
amdgpu_fbdev_init(adev);
r = amdgpu_gem_debugfs_init(adev); r = amdgpu_gem_debugfs_init(adev);
if (r) { if (r) {
DRM_ERROR("registering gem debugfs failed (%d).\n", r); DRM_ERROR("registering gem debugfs failed (%d).\n", r);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment