Skip to contentSkip to conversation

drm/amdgpu: set error query ready after all IPs late init

PATCH In review Dennis Li 2 participants 2 messages Apr 22, 2020

Subsystems (2)
lore
Share & tools
lore

Dennis Li

author
#0 lore raw

PATCH v2 1/1 drm/amdgpu: set error query ready after all IPs late init

If set error query ready in amdgpu_ras_late_init, which will cause some IP blocks aren't initialized, but their error query is ready.

v2: change the prefix of title to "drm/amdgpu" and remove the unnecessary "{}".

Change-Id I5087527261cb1b462afd82ad7592cf1ef73b15bd
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 423eed223aa5..e37e0982cd46 100644
@@ -2218,6 +2218,8 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev)
 		adev->ip_blocks[i].status.late_initialized = true;
 	}
 
+	amdgpu_ras_set_error_query_ready(adev, true);
+
 	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE);
 	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_GATE);
 
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -5
index 68b82f7b0b80..8b14aee370c8 100644
@@ -1921,10 +1921,8 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev,
 	}
 
 	/* in resume phase, no need to create ras fs node */
-	if (adev->in_suspend || adev->in_gpu_reset) {
-		amdgpu_ras_set_error_query_ready(adev, true);
+	if (adev->in_suspend || adev->in_gpu_reset)
 		return 0;
-	}
 
 	if (ih_info->cb) {
 		r = amdgpu_ras_interrupt_add_handler(adev, ih_info);
@@ -1936,8 +1934,6 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev,
 	if (r)
 		goto sysfs;
 
-	amdgpu_ras_set_error_query_ready(adev, true);
-
 	return 0;
 cleanup:
 	amdgpu_ras_sysfs_remove(adev, ras_block);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v2 1/1
#1 lore raw

[AMD Public Use]

Regards,
Guchun

-----Original Message-----
From: Dennis Li <[email protected]>
Sent: Wednesday, April 22, 2020 1:57 PM
To: [email protected]; Deucher, Alexander <[email protected]>; Zhou1, Tao <[email protected]>; Zhang, Hawking <[email protected]>; Chen, Guchun <[email protected]>
Cc: Li, Dennis <[email protected]>
Subject: [PATCH v2] drm/amdgpu: set error query ready after all IPs late init

If set error query ready in amdgpu_ras_late_init, which will cause some IP blocks aren't initialized, but their error query is ready.

v2: change the prefix of title to "drm/amdgpu" and remove the unnecessary "{}".

Change-Id I5087527261cb1b462afd82ad7592cf1ef73b15bd
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 423eed223aa5..e37e0982cd46 100644
@@ -2218,6 +2218,8 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev)
 		adev->ip_blocks[i].status.late_initialized = true;
 	}
 
+	amdgpu_ras_set_error_query_ready(adev, true);
+
 	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE);
 	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_GATE);
 
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -3
index 68b82f7b0b80..8b14aee370c8 100644
@@ -1921,10 +1921,8 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev,
 	}
 
 	/* in resume phase, no need to create ras fs node */
-	if (adev->in_suspend || adev->in_gpu_reset) {
-		amdgpu_ras_set_error_query_ready(adev, true);
+	if (adev->in_suspend || adev->in_gpu_reset)
 		return 0;
-	}
 
 	if (ih_info->cb) {
 		r = amdgpu_ras_interrupt_add_handler(adev, ih_info); @@ -1936,8 +1934,6 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev,

if (r)
goto sysfs;

- amdgpu_ras_set_error_query_ready(adev, true);
-
return 0;
cleanup:
amdgpu_ras_sysfs_remove(adev, ras_block);
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx