Skip to contentSkip to conversation

drm/amdgpu:use hw_init for sriov_gpu_reset

PATCH In review Monk Liu 3 participants 3 messages Feb 9, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Monk Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu:use hw_init for sriov_gpu_reset

no suspend invoked so after VF FLR by host, we just call hw_init to reinitialize IPs.

Change-Id If09cb42b09bee6acc84e6b239ef537ad5a3df41c
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -6
index 0d33bc9..7e64110 100644
@@ -1604,7 +1604,7 @@ int amdgpu_suspend(struct amdgpu_device *adev)
 	return 0;
 }
 
-static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_early(struct amdgpu_device *adev)
 {
 	int i, r;
 
@@ -1615,7 +1615,7 @@ static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
 		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
 				adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
 				adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH)
-			r = adev->ip_blocks[i].version->funcs->resume(adev);
+			r = adev->ip_blocks[i].version->funcs->hw_init(adev);
 
 		if (r) {
 			DRM_ERROR("resume of IP block <%s> failed %d\n",
@@ -1627,7 +1627,7 @@ static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
 	return 0;
 }
 
-static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
 {
 	int i, r;
 
@@ -1640,7 +1640,7 @@ static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
 				adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH )
 			continue;
 
-		r = adev->ip_blocks[i].version->funcs->resume(adev);
+		r = adev->ip_blocks[i].version->funcs->hw_init(adev);
 		if (r) {
 			DRM_ERROR("resume of IP block <%s> failed %d\n",
 				  adev->ip_blocks[i].version->funcs->name, r);
@@ -2433,13 +2433,13 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, bool voluntary)
 
 
 	/* Resume IP prior to SMC */
-	amdgpu_sriov_resume_early(adev);
+	amdgpu_sriov_reinit_early(adev);
 
 	/* we need recover gart prior to run SMC/CP/SDMA resume */
 	amdgpu_ttm_recover_gart(adev);
 
 	/* now we are okay to resume SMC/CP/SDMA */
-	amdgpu_sriov_resume_late(adev);
+	amdgpu_sriov_reinit_late(adev);
 
 	amdgpu_irq_gpu_reset_resume_helper(adev);
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1486619178-30375-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Monk Liu
Sent: Thursday, February 09, 2017 12:46 AM
To: [email protected]
Cc: Liu, Monk
Subject: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset

Quoted 5 lines

no suspend invoked so after VF FLR by host, we just call hw_init to reinitialize IPs.

Change-Id If09cb42b09bee6acc84e6b239ef537ad5a3df41c
Quoted 76 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 0d33bc9..7e64110 100644
@@ -1604,7 +1604,7 @@ int amdgpu_suspend(struct amdgpu_device
 *adev)
 	return 0;
 }
 
-static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_early(struct amdgpu_device *adev)
 {
 	int i, r;
@@ -1615,7 +1615,7 @@ static int amdgpu_sriov_resume_early(struct
 amdgpu_device *adev)
 		if (adev->ip_blocks[i].version->type ==

AMD_IP_BLOCK_TYPE_COMMON ||
adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_GMC ||
adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_IH)

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
-			r = adev->ip_blocks[i].version->funcs-
Quoted 1 line

resume(adev);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+			r = adev->ip_blocks[i].version->funcs-
Quoted 1 line

hw_init(adev);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
 		if (r) {
 			DRM_ERROR("resume of IP block <%s> failed %d\n",
@@ -1627,7 +1627,7 @@ static int amdgpu_sriov_resume_early(struct
 amdgpu_device *adev)
 	return 0;
 }
 
-static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
 {
 	int i, r;
@@ -1640,7 +1640,7 @@ static int amdgpu_sriov_resume_late(struct
 amdgpu_device *adev)
 				adev->ip_blocks[i].version->type ==
 AMD_IP_BLOCK_TYPE_IH )
 			continue;
 
-		r = adev->ip_blocks[i].version->funcs->resume(adev);
+		r = adev->ip_blocks[i].version->funcs->hw_init(adev);
 		if (r) {
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
 			DRM_ERROR("resume of IP block <%s> failed %d\n",
 				  adev->ip_blocks[i].version->funcs->name,

r);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -3
@@ -2433,13 +2433,13 @@ int amdgpu_sriov_gpu_reset(struct
 amdgpu_device *adev, bool voluntary)
 
 
 	/* Resume IP prior to SMC */
-	amdgpu_sriov_resume_early(adev);
+	amdgpu_sriov_reinit_early(adev);
 
 	/* we need recover gart prior to run SMC/CP/SDMA resume */
 	amdgpu_ttm_recover_gart(adev);
 
 	/* now we are okay to resume SMC/CP/SDMA */
-	amdgpu_sriov_resume_late(adev);
+	amdgpu_sriov_reinit_late(adev);
 
 	amdgpu_irq_gpu_reset_resume_helper(adev);
 
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB16523B5CB9E84340EF6B54A8F7450-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

Reviewed-by
#4 lore raw

Am 09.02.2017 um 15:37 schrieb Deucher, Alexander:

Quoted 8 lines
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Monk Liu
Sent: Thursday, February 09, 2017 12:46 AM
To: [email protected]
Cc: Liu, Monk
Subject: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset

Quoted 6 lines
Quoted 5 lines

no suspend invoked so after VF FLR by host, we just call hw_init to reinitialize IPs.

Change-Id If09cb42b09bee6acc84e6b239ef537ad5a3df41c
Quoted 76 lines
Quoted 76 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 0d33bc9..7e64110 100644
@@ -1604,7 +1604,7 @@ int amdgpu_suspend(struct amdgpu_device
 *adev)
  	return 0;
  }
 
-static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_early(struct amdgpu_device *adev)
  {
  	int i, r;
@@ -1615,7 +1615,7 @@ static int amdgpu_sriov_resume_early(struct
 amdgpu_device *adev)
  		if (adev->ip_blocks[i].version->type ==

AMD_IP_BLOCK_TYPE_COMMON ||
adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_GMC ||
adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_IH)

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
-			r = adev->ip_blocks[i].version->funcs-
Quoted 1 line

resume(adev);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+			r = adev->ip_blocks[i].version->funcs-
Quoted 1 line

hw_init(adev);

if (r) {
DRM_ERROR("resume of IP block <%s> failed %d\n",

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -1627,7 +1627,7 @@ static int amdgpu_sriov_resume_early(struct
 amdgpu_device *adev)
  	return 0;
  }
 
-static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
  {
  	int i, r;
@@ -1640,7 +1640,7 @@ static int amdgpu_sriov_resume_late(struct
 amdgpu_device *adev)
  				adev->ip_blocks[i].version->type ==
 AMD_IP_BLOCK_TYPE_IH )
  			continue;
 
-		r = adev->ip_blocks[i].version->funcs->resume(adev);
+		r = adev->ip_blocks[i].version->funcs->hw_init(adev);
  		if (r) {

DRM_ERROR("resume of IP block <%s> failed %d\n",
adev->ip_blocks[i].version->funcs->name,
r);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -3
@@ -2433,13 +2433,13 @@ int amdgpu_sriov_gpu_reset(struct
 amdgpu_device *adev, bool voluntary)
 
 
  	/* Resume IP prior to SMC */
-	amdgpu_sriov_resume_early(adev);
+	amdgpu_sriov_reinit_early(adev);
 
  	/* we need recover gart prior to run SMC/CP/SDMA resume */
  	amdgpu_ttm_recover_gart(adev);
 
  	/* now we are okay to resume SMC/CP/SDMA */
-	amdgpu_sriov_resume_late(adev);
+	amdgpu_sriov_reinit_late(adev);
 
  	amdgpu_irq_gpu_reset_resume_helper(adev);
 
--

2.7.4

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx