[PATCH] drm/amdgpu/SRIOV: Only reset hw.status for target IP

Zhao, Jiange Jiange.Zhao at amd.com
Wed Oct 30 02:26:24 UTC 2019


Ping.

@Deng, Emily<mailto:Emily.Deng at amd.com> @Liu, Monk<mailto:Monk.Liu at amd.com>, can you help review this patch?

Thanks!
Jiange
________________________________
From: Zhao, Jiange <jianzh at amd.com>
Sent: Tuesday, October 29, 2019 3:43 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deng, Emily <Emily.Deng at amd.com>; Liu, Monk <Monk.Liu at amd.com>; Chang, HaiJun <HaiJun.Chang at amd.com>; Zhao, Jiange <Jiange.Zhao at amd.com>
Subject: [PATCH] drm/amdgpu/SRIOV: Only reset hw.status for target IP

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

In the old way, when doing IH hw_init, PSP, nv_common
and GMC hw.status would be reset to false, even though
their hw_init have been done. In the next step, fw_loading,
PSP would do hw_init again.

In the new way, only reset hw.status to false for the target
IP in the list. In this way, PSP will only do hw_init once.

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4eee40b9d0b0..ad6d2452fed9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2352,11 +2352,11 @@ 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;

+                       block->status.hw = false;
                         r = block->version->funcs->hw_init(adev);
                         DRM_INFO("RE-INIT-early: %s %s\n", block->version->funcs->name, r?"failed":"succeeded");
                         if (r)
--
2.20.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20191030/b8b6dd59/attachment.html>


More information about the amd-gfx mailing list