]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/amdgpu/sriov disable all ip hw status by default
authorJack Zhang <Jack.Zhang1@amd.com>
Tue, 27 Apr 2021 09:08:47 +0000 (17:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:15:58 +0000 (16:15 +0200)
[ Upstream commit 95ea3dbc4e9548d35ab6fbf67675cef8c293e2f5 ]

Disable all ip's hw status to false before any hw_init.
Only set it to true until its hw_init is executed.

The old 5.9 branch has this change but somehow the 5.11 kernrel does
not have this fix.

Without this change, sriov tdr have gfx IB test fail.

Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com>
Review-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 7f6af421d3e98998dd534da186ea89b2f86bbdc6..102b05b8f0c2bf9b4bda5f283c670c1a77b49ea1 100644 (file)
@@ -2069,7 +2069,7 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
                AMD_IP_BLOCK_TYPE_IH,
        };
 
-       for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
+       for (i = 0; i < adev->num_ip_blocks; i++) {
                int j;
                struct amdgpu_ip_block *block;