]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: correct the gpu reset handling for job != NULL case
authorEvan Quan <evan.quan@amd.com>
Thu, 15 Oct 2020 06:57:46 +0000 (14:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:51:49 +0000 (11:51 +0100)
commit 207ac684792560acdb9e06f9d707ebf63c84b0e0 upstream.

Current code wrongly treat all cases as job == NULL.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-and-tested-by: Jane Jian <Jane.Jian@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 2576c299958c5fef512a6fa01b06dacd08eca3d0..b4a8da8fc8fd7fb08962288bdffae175753e1a5a 100644 (file)
@@ -4374,7 +4374,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
 retry: /* Rest of adevs pre asic reset from XGMI hive. */
        list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) {
                r = amdgpu_device_pre_asic_reset(tmp_adev,
-                                                NULL,
+                                                (tmp_adev == adev) ? job : NULL,
                                                 &need_full_reset);
                /*TODO Should we stop ?*/
                if (r) {