[PATCH] drm/amdgpu/SRIOV: Reorganize hw.status for SRIOV re-init

jianzh at amd.com jianzh at amd.com
Mon Oct 28 10:23:31 UTC 2019


From: Jiange Zhao <Jiange.Zhao at amd.com>

in amdgpu_device_ip_reinit_early_sriov, after IH hw_init,
only IH's hw.status is true. Other three IP's hw.status
are re-set to false, even though they have already done
hw_init.

The new way is to do hw_init for each IP in the list,
regardless of hw.status. And set hw.status only after
hw_init is done.

Signed-off-by: Jiange Zhao <Jiange.Zhao at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 676cad15239f..dcce498e84e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2352,7 +2352,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		for (j = 0; j < adev->num_ip_blocks; j++) {
 			block = &adev->ip_blocks[j];
 
-			block->status.hw = false;
 			if (block->version->type != ip_order[i] ||
 				!block->status.valid)
 				continue;
@@ -2389,8 +2388,7 @@ static int amdgpu_device_ip_reinit_late_sriov(struct amdgpu_device *adev)
 			block = &adev->ip_blocks[j];
 
 			if (block->version->type != ip_order[i] ||
-				!block->status.valid ||
-				block->status.hw)
+				!block->status.valid)
 				continue;
 
 			r = block->version->funcs->hw_init(adev);
-- 
2.20.1



More information about the amd-gfx mailing list