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

Liu, Monk Monk.Liu at amd.com
Wed Oct 30 03:38:12 UTC 2019


Hi Jiange

You need to send the patch to amd-gfx for review if it intend to go drm-next branch

For gibraltar branch your patch is -1 by CI

_____________________________________
Monk Liu|GPU Virtualization Team |AMD
[sig-cloud-gpu]

From: Zhao, Jiange <Jiange.Zhao at amd.com>
Sent: Wednesday, October 30, 2019 10:26 AM
To: Zhao, Jiange <Jiange.Zhao at amd.com>; 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>
Subject: Re: [PATCH] drm/amdgpu/SRIOV: Only reset hw.status for target IP

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<mailto:jianzh at amd.com>>
Sent: Tuesday, October 29, 2019 3:43 PM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org> <amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>>
Cc: Deng, Emily <Emily.Deng at amd.com<mailto:Emily.Deng at amd.com>>; Liu, Monk <Monk.Liu at amd.com<mailto:Monk.Liu at amd.com>>; Chang, HaiJun <HaiJun.Chang at amd.com<mailto:HaiJun.Chang at amd.com>>; Zhao, Jiange <Jiange.Zhao at amd.com<mailto: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<mailto: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<mailto: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/287128cc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 12243 bytes
Desc: image001.png
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20191030/287128cc/attachment-0001.png>


More information about the amd-gfx mailing list