Skip to content

Commit e283f4f

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amdgpu: Use reset recovery state checks
Some in_reset checks are infact checking whether the state is reinitialization after reset. Replace with reset_in_recovery calls to identify that it's really checking for recovery stage after reset. Signed-off-by: Lijo Lazar <[email protected]> Acked-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a86e0c0 commit e283f4f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3258,7 +3258,7 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev)
32583258
return r;
32593259
}
32603260

3261-
if (!amdgpu_in_reset(adev))
3261+
if (!amdgpu_reset_in_recovery(adev))
32623262
amdgpu_ras_set_error_query_ready(adev, true);
32633263

32643264
amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE);

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ int amdgpu_ras_bind_aca(struct amdgpu_device *adev, enum amdgpu_ras_block blk,
12981298
struct ras_manager *obj;
12991299

13001300
/* in resume phase, no need to create aca fs node */
1301-
if (adev->in_suspend || amdgpu_in_reset(adev))
1301+
if (adev->in_suspend || amdgpu_reset_in_recovery(adev))
13021302
return 0;
13031303

13041304
obj = get_ras_manager(adev, blk);
@@ -3610,7 +3610,7 @@ static void amdgpu_ras_event_mgr_init(struct amdgpu_device *adev)
36103610
ras->event_mgr = hive ? &hive->event_mgr : &ras->__event_mgr;
36113611

36123612
/* init event manager with node 0 on xgmi system */
3613-
if (!amdgpu_in_reset(adev)) {
3613+
if (!amdgpu_reset_in_recovery(adev)) {
36143614
if (!hive || adev->gmc.xgmi.node_id == 0)
36153615
ras_event_mgr_init(ras->event_mgr);
36163616
}
@@ -3825,7 +3825,7 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev,
38253825

38263826
r = amdgpu_ras_feature_enable_on_boot(adev, ras_block, 1);
38273827
if (r) {
3828-
if (adev->in_suspend || amdgpu_in_reset(adev)) {
3828+
if (adev->in_suspend || amdgpu_reset_in_recovery(adev)) {
38293829
/* in resume phase, if fail to enable ras,
38303830
* clean up all ras fs nodes, and disable ras */
38313831
goto cleanup;
@@ -3837,7 +3837,7 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev,
38373837
amdgpu_persistent_edc_harvesting(adev, ras_block);
38383838

38393839
/* in resume phase, no need to create ras fs node */
3840-
if (adev->in_suspend || amdgpu_in_reset(adev))
3840+
if (adev->in_suspend || amdgpu_reset_in_recovery(adev))
38413841
return 0;
38423842

38433843
ras_obj = container_of(ras_block, struct amdgpu_ras_block_object, ras_comm);
@@ -3967,7 +3967,7 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev)
39673967
amdgpu_ras_event_mgr_init(adev);
39683968

39693969
if (amdgpu_ras_aca_is_supported(adev)) {
3970-
if (amdgpu_in_reset(adev)) {
3970+
if (amdgpu_reset_in_recovery(adev)) {
39713971
if (amdgpu_aca_is_enabled(adev))
39723972
r = amdgpu_aca_reset(adev);
39733973
else

0 commit comments

Comments
 (0)