Lines Matching refs:tmp_adev
4260 struct amdgpu_device *tmp_adev = NULL; in amdgpu_do_asic_reset() local
4269 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) { in amdgpu_do_asic_reset()
4271 if (tmp_adev->gmc.xgmi.num_physical_nodes > 1) { in amdgpu_do_asic_reset()
4272 if (!queue_work(system_unbound_wq, &tmp_adev->xgmi_reset_work)) in amdgpu_do_asic_reset()
4275 r = amdgpu_asic_reset(tmp_adev); in amdgpu_do_asic_reset()
4278 dev_err(tmp_adev->dev, "ASIC reset failed with error, %d for drm dev, %s", in amdgpu_do_asic_reset()
4279 r, adev_to_drm(tmp_adev)->unique); in amdgpu_do_asic_reset()
4286 list_for_each_entry(tmp_adev, device_list_handle, in amdgpu_do_asic_reset()
4288 if (tmp_adev->gmc.xgmi.num_physical_nodes > 1) { in amdgpu_do_asic_reset()
4289 flush_work(&tmp_adev->xgmi_reset_work); in amdgpu_do_asic_reset()
4290 r = tmp_adev->asic_reset_res; in amdgpu_do_asic_reset()
4299 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) { in amdgpu_do_asic_reset()
4300 if (tmp_adev->mmhub.funcs && in amdgpu_do_asic_reset()
4301 tmp_adev->mmhub.funcs->reset_ras_error_count) in amdgpu_do_asic_reset()
4302 tmp_adev->mmhub.funcs->reset_ras_error_count(tmp_adev); in amdgpu_do_asic_reset()
4308 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) { in amdgpu_do_asic_reset()
4311 if (amdgpu_device_asic_init(tmp_adev)) in amdgpu_do_asic_reset()
4312 dev_warn(tmp_adev->dev, "asic atom init failed!"); in amdgpu_do_asic_reset()
4315 dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n"); in amdgpu_do_asic_reset()
4316 r = amdgpu_amdkfd_resume_iommu(tmp_adev); in amdgpu_do_asic_reset()
4320 r = amdgpu_device_ip_resume_phase1(tmp_adev); in amdgpu_do_asic_reset()
4324 vram_lost = amdgpu_device_check_vram_lost(tmp_adev); in amdgpu_do_asic_reset()
4327 amdgpu_inc_vram_lost(tmp_adev); in amdgpu_do_asic_reset()
4330 r = amdgpu_gtt_mgr_recover(ttm_manager_type(&tmp_adev->mman.bdev, TTM_PL_TT)); in amdgpu_do_asic_reset()
4334 r = amdgpu_device_fw_loading(tmp_adev); in amdgpu_do_asic_reset()
4338 r = amdgpu_device_ip_resume_phase2(tmp_adev); in amdgpu_do_asic_reset()
4343 amdgpu_device_fill_reset_magic(tmp_adev); in amdgpu_do_asic_reset()
4349 amdgpu_register_gpu_instance(tmp_adev); in amdgpu_do_asic_reset()
4351 r = amdgpu_device_ip_late_init(tmp_adev); in amdgpu_do_asic_reset()
4355 amdgpu_fbdev_set_suspend(tmp_adev, 0); in amdgpu_do_asic_reset()
4367 if (!amdgpu_ras_check_err_threshold(tmp_adev)) { in amdgpu_do_asic_reset()
4369 amdgpu_ras_resume(tmp_adev); in amdgpu_do_asic_reset()
4376 if (hive && tmp_adev->gmc.xgmi.num_physical_nodes > 1) in amdgpu_do_asic_reset()
4377 r = amdgpu_xgmi_update_topology(hive, tmp_adev); in amdgpu_do_asic_reset()
4383 amdgpu_irq_gpu_reset_resume_helper(tmp_adev); in amdgpu_do_asic_reset()
4384 r = amdgpu_ib_ring_tests(tmp_adev); in amdgpu_do_asic_reset()
4386 dev_err(tmp_adev->dev, "ib ring test failed (%d).\n", r); in amdgpu_do_asic_reset()
4394 r = amdgpu_device_recover_vram(tmp_adev); in amdgpu_do_asic_reset()
4396 tmp_adev->asic_reset_res = r; in amdgpu_do_asic_reset()
4520 struct amdgpu_device *tmp_adev = NULL; in amdgpu_device_gpu_recover() local
4581 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) { in amdgpu_device_gpu_recover()
4582 if (!amdgpu_device_lock_adev(tmp_adev, hive)) { in amdgpu_device_gpu_recover()
4583 dev_info(tmp_adev->dev, "Bailing on TDR for s_job:%llx, as another already in progress", in amdgpu_device_gpu_recover()
4599 if (!amdgpu_device_suspend_display_audio(tmp_adev)) in amdgpu_device_gpu_recover()
4602 amdgpu_ras_set_error_query_ready(tmp_adev, false); in amdgpu_device_gpu_recover()
4604 cancel_delayed_work_sync(&tmp_adev->delayed_init_work); in amdgpu_device_gpu_recover()
4606 if (!amdgpu_sriov_vf(tmp_adev)) in amdgpu_device_gpu_recover()
4607 amdgpu_amdkfd_pre_reset(tmp_adev); in amdgpu_device_gpu_recover()
4613 amdgpu_unregister_gpu_instance(tmp_adev); in amdgpu_device_gpu_recover()
4615 amdgpu_fbdev_set_suspend(tmp_adev, 1); in amdgpu_device_gpu_recover()
4619 amdgpu_device_ip_need_full_reset(tmp_adev)) in amdgpu_device_gpu_recover()
4620 amdgpu_ras_suspend(tmp_adev); in amdgpu_device_gpu_recover()
4623 struct amdgpu_ring *ring = tmp_adev->rings[i]; in amdgpu_device_gpu_recover()
4652 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) { in amdgpu_device_gpu_recover()
4653 r = amdgpu_device_pre_asic_reset(tmp_adev, in amdgpu_device_gpu_recover()
4654 (tmp_adev == adev) ? job : NULL, in amdgpu_device_gpu_recover()
4658 dev_err(tmp_adev->dev, "GPU pre asic reset failed with err, %d for drm dev, %s ", in amdgpu_device_gpu_recover()
4659 r, adev_to_drm(tmp_adev)->unique); in amdgpu_device_gpu_recover()
4660 tmp_adev->asic_reset_res = r; in amdgpu_device_gpu_recover()
4679 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) { in amdgpu_device_gpu_recover()
4682 struct amdgpu_ring *ring = tmp_adev->rings[i]; in amdgpu_device_gpu_recover()
4688 if (!tmp_adev->asic_reset_res && !job_signaled) in amdgpu_device_gpu_recover()
4691 drm_sched_start(&ring->sched, !tmp_adev->asic_reset_res); in amdgpu_device_gpu_recover()
4694 if (!amdgpu_device_has_dc_support(tmp_adev) && !job_signaled) { in amdgpu_device_gpu_recover()
4695 drm_helper_resume_force_mode(adev_to_drm(tmp_adev)); in amdgpu_device_gpu_recover()
4698 tmp_adev->asic_reset_res = 0; in amdgpu_device_gpu_recover()
4702 dev_info(tmp_adev->dev, "GPU reset(%d) failed\n", atomic_read(&tmp_adev->gpu_reset_counter)); in amdgpu_device_gpu_recover()
4703 amdgpu_vf_error_put(tmp_adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r); in amdgpu_device_gpu_recover()
4705 dev_info(tmp_adev->dev, "GPU reset(%d) succeeded!\n", atomic_read(&tmp_adev->gpu_reset_counter)); in amdgpu_device_gpu_recover()
4710 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) { in amdgpu_device_gpu_recover()
4712 if (!need_emergency_restart && !amdgpu_sriov_vf(tmp_adev)) in amdgpu_device_gpu_recover()
4713 amdgpu_amdkfd_post_reset(tmp_adev); in amdgpu_device_gpu_recover()
4715 amdgpu_device_resume_display_audio(tmp_adev); in amdgpu_device_gpu_recover()
4716 amdgpu_device_unlock_adev(tmp_adev); in amdgpu_device_gpu_recover()