aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorShaoyun Liu <Shaoyun.Liu@amd.com>2018-02-01 18:13:23 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:19:49 -0500
commit9475a9434f594f3a972ab8cb71e9c1333923acf6 (patch)
treed5f5428cde279bfb53b05845a86f626eb97c69a0 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent593aa2d282259e837bfe029f75474729b917e911 (diff)
drm/amdgpu: Add place holder for soc15 asic init on emulation
Add common smu_soc_asic_init function to emulate the sillicon post sequence Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@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.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c3e2235cb430..c9a8cf87934e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1311,19 +1311,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
1311 } 1311 }
1312 adev->ip_blocks[i].status.sw = true; 1312 adev->ip_blocks[i].status.sw = true;
1313 1313
1314 if (amdgpu_emu_mode == 1) {
1315 /* Need to do common hw init first on emulation */
1316 if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
1317 r = adev->ip_blocks[i].version->funcs->hw_init((void *)adev);
1318 if (r) {
1319 DRM_ERROR("hw_init of IP block <%s> failed %d\n",
1320 adev->ip_blocks[i].version->funcs->name, r);
1321 return r;
1322 }
1323 adev->ip_blocks[i].status.hw = true;
1324 }
1325 }
1326
1327 /* need to do gmc hw init early so we can allocate gpu mem */ 1314 /* need to do gmc hw init early so we can allocate gpu mem */
1328 if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC) { 1315 if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC) {
1329 r = amdgpu_device_vram_scratch_init(adev); 1316 r = amdgpu_device_vram_scratch_init(adev);
@@ -1902,8 +1889,11 @@ int amdgpu_device_init(struct amdgpu_device *adev,
1902 if (runtime) 1889 if (runtime)
1903 vga_switcheroo_init_domain_pm_ops(adev->dev, &adev->vga_pm_domain); 1890 vga_switcheroo_init_domain_pm_ops(adev->dev, &adev->vga_pm_domain);
1904 1891
1905 if (amdgpu_emu_mode == 1) 1892 if (amdgpu_emu_mode == 1) {
1893 /* post the asic on emulation mode */
1894 emu_soc_asic_init(adev);
1906 goto fence_driver_init; 1895 goto fence_driver_init;
1896 }
1907 1897
1908 /* Read BIOS */ 1898 /* Read BIOS */
1909 if (!amdgpu_get_bios(adev)) { 1899 if (!amdgpu_get_bios(adev)) {