diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-03-09 15:14:11 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-03-14 17:01:16 -0400 |
commit | 5494d8640ffc1df6096fd37943948ab46a152850 (patch) | |
tree | b17883b835969c40c14bfdd09b14382bca10fed0 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 3cdfe700567a653ba18dfe012f74b6b75b4bd946 (diff) |
drm/amdgpu: move getting pcie info to common code
No need to replicate it in several places.
Reviewed-by: Rex Zhu <rezhu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index b054fea35876..7d7d30b8a719 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -87,6 +87,8 @@ static const char *amdgpu_asic_name[] = { | |||
87 | "LAST", | 87 | "LAST", |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static void amdgpu_device_get_pcie_info(struct amdgpu_device *adev); | ||
91 | |||
90 | bool amdgpu_device_is_px(struct drm_device *dev) | 92 | bool amdgpu_device_is_px(struct drm_device *dev) |
91 | { | 93 | { |
92 | struct amdgpu_device *adev = dev->dev_private; | 94 | struct amdgpu_device *adev = dev->dev_private; |
@@ -1909,6 +1911,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, | |||
1909 | if (adev->rio_mem == NULL) | 1911 | if (adev->rio_mem == NULL) |
1910 | DRM_INFO("PCI I/O BAR is not found.\n"); | 1912 | DRM_INFO("PCI I/O BAR is not found.\n"); |
1911 | 1913 | ||
1914 | amdgpu_device_get_pcie_info(adev); | ||
1915 | |||
1912 | /* early init functions */ | 1916 | /* early init functions */ |
1913 | r = amdgpu_device_ip_early_init(adev); | 1917 | r = amdgpu_device_ip_early_init(adev); |
1914 | if (r) | 1918 | if (r) |
@@ -2786,7 +2790,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, | |||
2786 | return r; | 2790 | return r; |
2787 | } | 2791 | } |
2788 | 2792 | ||
2789 | void amdgpu_device_get_pcie_info(struct amdgpu_device *adev) | 2793 | static void amdgpu_device_get_pcie_info(struct amdgpu_device *adev) |
2790 | { | 2794 | { |
2791 | u32 mask; | 2795 | u32 mask; |
2792 | int ret; | 2796 | int ret; |