@@ -3197,7 +3197,7 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)
3197
3197
*
3198
3198
* @adev: amdgpu_device pointer
3199
3199
*
3200
- * Second resume function for hardware IPs. The list of all the hardware
3200
+ * First resume function for hardware IPs. The list of all the hardware
3201
3201
* IPs that make up the asic is walked and the resume callbacks are run for
3202
3202
* all blocks except COMMON, GMC, and IH. resume puts the hardware into a
3203
3203
* functional state after a suspend and updates the software state as
@@ -3215,7 +3215,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
3215
3215
if (adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_COMMON ||
3216
3216
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_GMC ||
3217
3217
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_IH ||
3218
- adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_DCE ||
3219
3218
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_PSP )
3220
3219
continue ;
3221
3220
r = adev -> ip_blocks [i ].version -> funcs -> resume (adev );
@@ -3239,36 +3238,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
3239
3238
return 0 ;
3240
3239
}
3241
3240
3242
- /**
3243
- * amdgpu_device_ip_resume_phase3 - run resume for hardware IPs
3244
- *
3245
- * @adev: amdgpu_device pointer
3246
- *
3247
- * Third resume function for hardware IPs. The list of all the hardware
3248
- * IPs that make up the asic is walked and the resume callbacks are run for
3249
- * all DCE. resume puts the hardware into a functional state after a suspend
3250
- * and updates the software state as necessary. This function is also used
3251
- * for restoring the GPU after a GPU reset.
3252
- *
3253
- * Returns 0 on success, negative error code on failure.
3254
- */
3255
- static int amdgpu_device_ip_resume_phase3 (struct amdgpu_device * adev )
3256
- {
3257
- int i , r ;
3258
-
3259
- for (i = 0 ; i < adev -> num_ip_blocks ; i ++ ) {
3260
- if (!adev -> ip_blocks [i ].status .valid || adev -> ip_blocks [i ].status .hw )
3261
- continue ;
3262
- if (adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_DCE ) {
3263
- r = adev -> ip_blocks [i ].version -> funcs -> resume (adev );
3264
- if (r )
3265
- return r ;
3266
- }
3267
- }
3268
-
3269
- return 0 ;
3270
- }
3271
-
3272
3241
/**
3273
3242
* amdgpu_device_ip_resume - run resume for hardware IPs
3274
3243
*
@@ -3299,13 +3268,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
3299
3268
3300
3269
r = amdgpu_device_ip_resume_phase2 (adev );
3301
3270
3302
- if (r )
3303
- return r ;
3304
-
3305
- amdgpu_fence_driver_hw_init (adev );
3306
-
3307
- r = amdgpu_device_ip_resume_phase3 (adev );
3308
-
3309
3271
return r ;
3310
3272
}
3311
3273
@@ -4198,6 +4160,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
4198
4160
dev_err (adev -> dev , "amdgpu_device_ip_resume failed (%d).\n" , r );
4199
4161
return r ;
4200
4162
}
4163
+ amdgpu_fence_driver_hw_init (adev );
4201
4164
4202
4165
r = amdgpu_device_ip_late_init (adev );
4203
4166
if (r )
@@ -4843,10 +4806,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
4843
4806
if (r )
4844
4807
goto out ;
4845
4808
4846
- r = amdgpu_device_ip_resume_phase3 (tmp_adev );
4847
- if (r )
4848
- goto out ;
4849
-
4850
4809
if (vram_lost )
4851
4810
amdgpu_device_fill_reset_magic (tmp_adev );
4852
4811
0 commit comments