Skip to content

Commit 15994ba

Browse files
lyndonligregkh
authored andcommitted
drm/amdgpu: Use the default reset when loading or reloading the driver
[ Upstream commit 4eea7fb ] Below call trace and errors are observed when reloading amdgpu driver with the module parameter reset_method=3. It should do a default reset when loading or reloading the driver, regardless of the module parameter reset_method. v2: add comments inside and modify commit messages. [ +2.180243] [drm] psp gfx command ID_LOAD_TOC(0x20) failed and response status is (0x0) [ +0.000011] [drm:psp_hw_start [amdgpu]] *ERROR* Failed to load toc [ +0.000890] [drm:psp_hw_start [amdgpu]] *ERROR* PSP tmr init failed! [ +0.020683] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ +0.000003] RIP: 0010:amdgpu_bo_release_notify+0x1ef/0x210 [amdgpu] [ +0.000004] Call Trace: [ +0.000003] <TASK> [ +0.000008] ttm_bo_release+0x2c4/0x330 [amdttm] [ +0.000026] amdttm_bo_put+0x3c/0x70 [amdttm] [ +0.000020] amdgpu_bo_free_kernel+0xe6/0x140 [amdgpu] [ +0.000728] psp_v11_0_ring_destroy+0x34/0x60 [amdgpu] [ +0.000826] psp_hw_init+0xe7/0x2f0 [amdgpu] [ +0.000813] amdgpu_device_fw_loading+0x1ad/0x2d0 [amdgpu] [ +0.000731] amdgpu_device_init.cold+0x108e/0x2002 [amdgpu] [ +0.001071] ? do_pci_enable_device+0xe1/0x110 [ +0.000011] amdgpu_driver_load_kms+0x1a/0x160 [amdgpu] [ +0.000729] amdgpu_pci_probe+0x179/0x3a0 [amdgpu] Signed-off-by: lyndonli <[email protected]> Signed-off-by: Yunxiang Li <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 675f7c8 commit 15994ba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3558,6 +3558,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
35583558
int r, i;
35593559
bool px = false;
35603560
u32 max_MBps;
3561+
int tmp;
35613562

35623563
adev->shutdown = false;
35633564
adev->flags = flags;
@@ -3779,7 +3780,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
37793780
}
37803781
}
37813782
} else {
3783+
tmp = amdgpu_reset_method;
3784+
/* It should do a default reset when loading or reloading the driver,
3785+
* regardless of the module parameter reset_method.
3786+
*/
3787+
amdgpu_reset_method = AMD_RESET_METHOD_NONE;
37823788
r = amdgpu_asic_reset(adev);
3789+
amdgpu_reset_method = tmp;
37833790
if (r) {
37843791
dev_err(adev->dev, "asic reset on init failed\n");
37853792
goto failed;

0 commit comments

Comments
 (0)