diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-19 00:32:05 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-19 00:32:05 +0000 |
commit | 46d1487385927ca73c9087a1762c5ea61f6d5327 (patch) | |
tree | d24b867c1fb5867419238e15e9a31d1d9aa8f728 | |
parent | 1d954f9e2b5c35234806d463a5d5f1ea4db30695 (diff) |
drm/amdgpu: Use the default reset when loading or reloading the driver
From lyndonli
88a042d599c3f253ea8a9aa1906833c144525af4 in linux-6.1.y/6.1.33
4eea7fb980dc44545a32eec92e2662053b34cd9d in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index aff64c9a64c..b8926763fc2 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -3591,6 +3591,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, int r, i; bool px = false; u32 max_MBps; + int tmp; adev->shutdown = false; adev->flags = flags; @@ -3818,7 +3819,13 @@ int amdgpu_device_init(struct amdgpu_device *adev, } } } else { + tmp = amdgpu_reset_method; + /* It should do a default reset when loading or reloading the driver, + * regardless of the module parameter reset_method. + */ + amdgpu_reset_method = AMD_RESET_METHOD_NONE; r = amdgpu_asic_reset(adev); + amdgpu_reset_method = tmp; if (r) { dev_err(adev->dev, "asic reset on init failed\n"); goto failed; |