@@ -1544,6 +1544,7 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
15441544 return true;
15451545
15461546 fw_ver = * ((uint32_t * )adev -> pm .fw -> data + 69 );
1547+ release_firmware (adev -> pm .fw );
15471548 if (fw_ver < 0x00160e00 )
15481549 return true;
15491550 }
@@ -5245,7 +5246,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
52455246 struct amdgpu_device * tmp_adev = NULL ;
52465247 bool need_full_reset , skip_hw_reset , vram_lost = false;
52475248 int r = 0 ;
5248- bool gpu_reset_for_dev_remove = 0 ;
52495249
52505250 /* Try reset handler method first */
52515251 tmp_adev = list_first_entry (device_list_handle , struct amdgpu_device ,
@@ -5265,10 +5265,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
52655265 test_bit (AMDGPU_NEED_FULL_RESET , & reset_context -> flags );
52665266 skip_hw_reset = test_bit (AMDGPU_SKIP_HW_RESET , & reset_context -> flags );
52675267
5268- gpu_reset_for_dev_remove =
5269- test_bit (AMDGPU_RESET_FOR_DEVICE_REMOVE , & reset_context -> flags ) &&
5270- test_bit (AMDGPU_NEED_FULL_RESET , & reset_context -> flags );
5271-
52725268 /*
52735269 * ASIC reset has to be done on all XGMI hive nodes ASAP
52745270 * to allow proper links negotiation in FW (within 1 sec)
@@ -5311,18 +5307,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
53115307 amdgpu_ras_intr_cleared ();
53125308 }
53135309
5314- /* Since the mode1 reset affects base ip blocks, the
5315- * phase1 ip blocks need to be resumed. Otherwise there
5316- * will be a BIOS signature error and the psp bootloader
5317- * can't load kdb on the next amdgpu install.
5318- */
5319- if (gpu_reset_for_dev_remove ) {
5320- list_for_each_entry (tmp_adev , device_list_handle , reset_list )
5321- amdgpu_device_ip_resume_phase1 (tmp_adev );
5322-
5323- goto end ;
5324- }
5325-
53265310 list_for_each_entry (tmp_adev , device_list_handle , reset_list ) {
53275311 if (need_full_reset ) {
53285312 /* post card */
@@ -5559,11 +5543,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
55595543 int i , r = 0 ;
55605544 bool need_emergency_restart = false;
55615545 bool audio_suspended = false;
5562- bool gpu_reset_for_dev_remove = false;
5563-
5564- gpu_reset_for_dev_remove =
5565- test_bit (AMDGPU_RESET_FOR_DEVICE_REMOVE , & reset_context -> flags ) &&
5566- test_bit (AMDGPU_NEED_FULL_RESET , & reset_context -> flags );
55675546
55685547 /*
55695548 * Special case: RAS triggered and full reset isn't supported
@@ -5601,7 +5580,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
56015580 if (!amdgpu_sriov_vf (adev ) && (adev -> gmc .xgmi .num_physical_nodes > 1 )) {
56025581 list_for_each_entry (tmp_adev , & hive -> device_list , gmc .xgmi .head ) {
56035582 list_add_tail (& tmp_adev -> reset_list , & device_list );
5604- if (gpu_reset_for_dev_remove && adev -> shutdown )
5583+ if (adev -> shutdown )
56055584 tmp_adev -> shutdown = true;
56065585 }
56075586 if (!list_is_first (& adev -> reset_list , & device_list ))
@@ -5686,10 +5665,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
56865665
56875666retry : /* Rest of adevs pre asic reset from XGMI hive. */
56885667 list_for_each_entry (tmp_adev , device_list_handle , reset_list ) {
5689- if (gpu_reset_for_dev_remove ) {
5690- /* Workaroud for ASICs need to disable SMC first */
5691- amdgpu_device_smu_fini_early (tmp_adev );
5692- }
56935668 r = amdgpu_device_pre_asic_reset (tmp_adev , reset_context );
56945669 /*TODO Should we stop ?*/
56955670 if (r ) {
@@ -5721,9 +5696,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
57215696 r = amdgpu_do_asic_reset (device_list_handle , reset_context );
57225697 if (r && r == - EAGAIN )
57235698 goto retry ;
5724-
5725- if (!r && gpu_reset_for_dev_remove )
5726- goto recover_end ;
57275699 }
57285700
57295701skip_hw_reset :
@@ -5779,7 +5751,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
57795751 amdgpu_ras_set_error_query_ready (tmp_adev , true);
57805752 }
57815753
5782- recover_end :
57835754 tmp_adev = list_first_entry (device_list_handle , struct amdgpu_device ,
57845755 reset_list );
57855756 amdgpu_device_unlock_reset_domain (tmp_adev -> reset_domain );
0 commit comments