]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Extend KIQ reg polling wait for VF
authorVictor Skvortsov <victor.skvortsov@amd.com>
Sun, 19 May 2024 14:34:18 +0000 (10:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 20 May 2024 20:20:25 +0000 (16:20 -0400)
Runtime KIQ interface to read/write registers in VF may take longer
than expected for BM environment. Extend the timeout.

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
Reviewed-by: Zhigang Luo <zhigang.luo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h

index 054e59fa0c443bc97bd90eeb800773dc30dbf2eb..35faa286bb1cab5cd1761581b2f6d956374cd4bd 100644 (file)
@@ -345,9 +345,9 @@ enum amdgpu_kiq_irq {
        AMDGPU_CP_KIQ_IRQ_DRIVER0 = 0,
        AMDGPU_CP_KIQ_IRQ_LAST
 };
-#define SRIOV_USEC_TIMEOUT  1200000 /* wait 12 * 100ms for SRIOV */
-#define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */
-#define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */
+#define SRIOV_USEC_TIMEOUT 1200000 /* wait 12 * 100ms for SRIOV */
+#define MAX_KIQ_REG_WAIT (amdgpu_sriov_vf(adev) ? 50000 : 5000) /* in usecs, extend for VF */
+#define MAX_KIQ_REG_BAILOUT_INTERVAL 5 /* in msecs, 5ms */
 #define MAX_KIQ_REG_TRY 1000
 
 int amdgpu_device_ip_set_clockgating_state(void *dev,