@@ -3172,7 +3172,7 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)
3172
3172
*
3173
3173
* @adev: amdgpu_device pointer
3174
3174
*
3175
- * Second resume function for hardware IPs. The list of all the hardware
3175
+ * First resume function for hardware IPs. The list of all the hardware
3176
3176
* IPs that make up the asic is walked and the resume callbacks are run for
3177
3177
* all blocks except COMMON, GMC, and IH. resume puts the hardware into a
3178
3178
* functional state after a suspend and updates the software state as
@@ -3190,7 +3190,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
3190
3190
if (adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_COMMON ||
3191
3191
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_GMC ||
3192
3192
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_IH ||
3193
- adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_DCE ||
3194
3193
adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_PSP )
3195
3194
continue ;
3196
3195
r = adev -> ip_blocks [i ].version -> funcs -> resume (adev );
@@ -3205,36 +3204,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
3205
3204
return 0 ;
3206
3205
}
3207
3206
3208
- /**
3209
- * amdgpu_device_ip_resume_phase3 - run resume for hardware IPs
3210
- *
3211
- * @adev: amdgpu_device pointer
3212
- *
3213
- * Third resume function for hardware IPs. The list of all the hardware
3214
- * IPs that make up the asic is walked and the resume callbacks are run for
3215
- * all DCE. resume puts the hardware into a functional state after a suspend
3216
- * and updates the software state as necessary. This function is also used
3217
- * for restoring the GPU after a GPU reset.
3218
- *
3219
- * Returns 0 on success, negative error code on failure.
3220
- */
3221
- static int amdgpu_device_ip_resume_phase3 (struct amdgpu_device * adev )
3222
- {
3223
- int i , r ;
3224
-
3225
- for (i = 0 ; i < adev -> num_ip_blocks ; i ++ ) {
3226
- if (!adev -> ip_blocks [i ].status .valid || adev -> ip_blocks [i ].status .hw )
3227
- continue ;
3228
- if (adev -> ip_blocks [i ].version -> type == AMD_IP_BLOCK_TYPE_DCE ) {
3229
- r = adev -> ip_blocks [i ].version -> funcs -> resume (adev );
3230
- if (r )
3231
- return r ;
3232
- }
3233
- }
3234
-
3235
- return 0 ;
3236
- }
3237
-
3238
3207
/**
3239
3208
* amdgpu_device_ip_resume - run resume for hardware IPs
3240
3209
*
@@ -3261,13 +3230,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
3261
3230
3262
3231
r = amdgpu_device_ip_resume_phase2 (adev );
3263
3232
3264
- if (r )
3265
- return r ;
3266
-
3267
- amdgpu_fence_driver_hw_init (adev );
3268
-
3269
- r = amdgpu_device_ip_resume_phase3 (adev );
3270
-
3271
3233
return r ;
3272
3234
}
3273
3235
@@ -4267,6 +4229,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
4267
4229
dev_err (adev -> dev , "amdgpu_device_ip_resume failed (%d).\n" , r );
4268
4230
goto exit ;
4269
4231
}
4232
+ amdgpu_fence_driver_hw_init (adev );
4270
4233
4271
4234
r = amdgpu_device_ip_late_init (adev );
4272
4235
if (r )
@@ -5036,10 +4999,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
5036
4999
if (r )
5037
5000
goto out ;
5038
5001
5039
- r = amdgpu_device_ip_resume_phase3 (tmp_adev );
5040
- if (r )
5041
- goto out ;
5042
-
5043
5002
if (vram_lost )
5044
5003
amdgpu_device_fill_reset_magic (tmp_adev );
5045
5004
0 commit comments