Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: correct single device PCIe reset flow for DPC

For triggering the dpc event with a single device, we still need
to set the in_link_reset flag and the dpc status.

Signed-off-by: Ce Sun <cesun102@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Ce Sun and committed by
Alex Deucher
169a0556 d91db49e

+9 -5
+7 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 5518 5518 list_add_tail(&tmp_adev->reset_list, device_list); 5519 5519 if (adev->shutdown) 5520 5520 tmp_adev->shutdown = true; 5521 - if (amdgpu_reset_in_dpc(adev)) 5522 - tmp_adev->pcie_reset_ctx.in_link_reset = true; 5523 5521 } 5524 5522 if (!list_is_first(&adev->reset_list, device_list)) 5525 5523 list_rotate_to_front(&adev->reset_list, device_list); ··· 6289 6291 amdgpu_reset_set_dpc_status(adev, true); 6290 6292 6291 6293 mutex_lock(&hive->hive_lock); 6294 + } else { 6295 + if (amdgpu_device_bus_status_check(adev)) 6296 + amdgpu_reset_set_dpc_status(adev, true); 6292 6297 } 6293 6298 memset(&reset_context, 0, sizeof(reset_context)); 6294 6299 INIT_LIST_HEAD(&device_list); ··· 6412 6411 list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) 6413 6412 tmp_adev->pcie_reset_ctx.in_link_reset = true; 6414 6413 } else { 6414 + adev->pcie_reset_ctx.in_link_reset = true; 6415 6415 set_bit(AMDGPU_SKIP_HW_RESET, &reset_context.flags); 6416 6416 } 6417 6417 ··· 6469 6467 tmp_adev->pcie_reset_ctx.in_link_reset = false; 6470 6468 list_add_tail(&tmp_adev->reset_list, &device_list); 6471 6469 } 6472 - } else 6470 + } else { 6471 + adev->pcie_reset_ctx.in_link_reset = false; 6473 6472 list_add_tail(&adev->reset_list, &device_list); 6474 - 6473 + } 6475 6474 amdgpu_device_sched_resume(&device_list, NULL, NULL); 6476 6475 amdgpu_device_gpu_resume(adev, &device_list, false); 6477 6476 amdgpu_device_recovery_put_reset_lock(adev, &device_list);
+2 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
··· 34 34 #include "amdgpu.h" 35 35 #include "amdgpu_pm.h" 36 36 #include "amdgpu_vcn.h" 37 + #include "amdgpu_reset.h" 37 38 #include "soc15d.h" 38 39 39 40 /* Firmware Names */ ··· 362 361 363 362 /* err_event_athub and dpc recovery will corrupt VCPU buffer, so we need to 364 363 * restore fw data and clear buffer in amdgpu_vcn_resume() */ 365 - if (in_ras_intr || adev->pcie_reset_ctx.in_link_reset) 364 + if (in_ras_intr || amdgpu_reset_in_dpc(adev)) 366 365 return 0; 367 366 368 367 return amdgpu_vcn_save_vcpu_bo_inst(adev, i);