diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-02-08 04:38:13 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:52:39 -0400 |
commit | 9bc92b9c8d0919b61660300249fa67e291ae0ecc (patch) | |
tree | 08e5a4c77a9823283f005ac7acdcf59bcbe50c45 | |
parent | edcafc0294589d5ad1220565ffd674007337cdc7 (diff) |
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: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 7bf246e25ab7..7d5ae500fe02 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1835,8 +1835,6 @@ int amdgpu_device_init(struct amdgpu_device *adev, | |||
1835 | /* Get a log2 for easy divisions. */ | 1835 | /* Get a log2 for easy divisions. */ |
1836 | adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps)); | 1836 | adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps)); |
1837 | 1837 | ||
1838 | amdgpu_fbdev_init(adev); | ||
1839 | |||
1840 | r = amdgpu_ib_pool_init(adev); | 1838 | r = amdgpu_ib_pool_init(adev); |
1841 | if (r) { | 1839 | if (r) { |
1842 | dev_err(adev->dev, "IB initialization failed (%d).\n", r); | 1840 | dev_err(adev->dev, "IB initialization failed (%d).\n", r); |
@@ -1847,6 +1845,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, | |||
1847 | if (r) | 1845 | if (r) |
1848 | DRM_ERROR("ib ring test failed (%d).\n", r); | 1846 | DRM_ERROR("ib ring test failed (%d).\n", r); |
1849 | 1847 | ||
1848 | amdgpu_fbdev_init(adev); | ||
1849 | |||
1850 | r = amdgpu_gem_debugfs_init(adev); | 1850 | r = amdgpu_gem_debugfs_init(adev); |
1851 | if (r) { | 1851 | if (r) { |
1852 | DRM_ERROR("registering gem debugfs failed (%d).\n", r); | 1852 | DRM_ERROR("registering gem debugfs failed (%d).\n", r); |