From 3abae83edb769129b82ab9dbc4b166f28cd0fc90 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 19 Jun 2023 00:32:04 +0000 Subject: [PATCH] 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 --- sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.20.1