@@ -3242,7 +3242,7 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)
3242
3242
*
3243
3243
* @adev: amdgpu_device pointer
3244
3244
*
3245
- * Second resume function for hardware IPs. The list of all the hardware
3245
+ * First resume function for hardware IPs. The list of all the hardware
3246
3246
* IPs that make up the asic is walked and the resume callbacks are run for
3247
3247
* all blocks except COMMON, GMC, and IH. resume puts the hardware into a
3248
3248
* functional state after a suspend and updates the software state as
@@ -3260,7 +3260,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
3260
3260
if (adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_COMMON ||
3261
3261
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_GMC ||
3262
3262
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_IH ||
3263
- adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_DCE ||
3264
3263
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_PSP )
3265
3264
continue ;
3266
3265
r = adev -> ip_blocks [i ].version -> funcs -> resume (adev );
@@ -3284,36 +3283,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
3284
3283
return 0 ;
3285
3284
}
3286
3285
3287
- /**
3288
- * amdgpu_device_ip_resume_phase3 - run resume for hardware IPs
3289
- *
3290
- * @adev: amdgpu_device pointer
3291
- *
3292
- * Third resume function for hardware IPs. The list of all the hardware
3293
- * IPs that make up the asic is walked and the resume callbacks are run for
3294
- * all DCE. resume puts the hardware into a functional state after a suspend
3295
- * and updates the software state as necessary. This function is also used
3296
- * for restoring the GPU after a GPU reset.
3297
- *
3298
- * Returns 0 on success, negative error code on failure.
3299
- */
3300
- static int amdgpu_device_ip_resume_phase3 (struct amdgpu_device * adev )
3301
- {
3302
- int i , r ;
3303
-
3304
- for (i = 0 ; i < adev -> num_ip_blocks ; i ++ ) {
3305
- if (!adev -> ip_blocks [i ].status .valid || adev -> ip_blocks [i ].status .hw )
3306
- continue ;
3307
- if (adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_DCE ) {
3308
- r = adev -> ip_blocks [i ].version -> funcs -> resume (adev );
3309
- if (r )
3310
- return r ;
3311
- }
3312
- }
3313
-
3314
- return 0 ;
3315
- }
3316
-
3317
3286
/**
3318
3287
* amdgpu_device_ip_resume - run resume for hardware IPs
3319
3288
*
@@ -3344,13 +3313,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
3344
3313
3345
3314
r = amdgpu_device_ip_resume_phase2 (adev );
3346
3315
3347
- if (r )
3348
- return r ;
3349
-
3350
- amdgpu_fence_driver_hw_init (adev );
3351
-
3352
- r = amdgpu_device_ip_resume_phase3 (adev );
3353
-
3354
3316
return r ;
3355
3317
}
3356
3318
@@ -4349,6 +4311,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
4349
4311
dev_err (adev -> dev , "amdgpu_device_ip_resume failed (%d).\n" , r );
4350
4312
return r ;
4351
4313
}
4314
+ amdgpu_fence_driver_hw_init (adev );
4352
4315
4353
4316
r = amdgpu_device_ip_late_init (adev );
4354
4317
if (r )
@@ -5102,10 +5065,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
5102
5065
if (r )
5103
5066
goto out ;
5104
5067
5105
- r = amdgpu_device_ip_resume_phase3 (tmp_adev );
5106
- if (r )
5107
- goto out ;
5108
-
5109
5068
if (vram_lost )
5110
5069
amdgpu_device_fill_reset_magic (tmp_adev );
5111
5070
0 commit comments