drm/amdgpu: Increase timout on emulator to tenfold instead of twice
authorYong Zhao <Yong.Zhao@amd.com>
Wed, 26 Feb 2020 00:54:53 +0000 (19:54 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 26 Feb 2020 19:21:03 +0000 (14:21 -0500)
Since emulators are slower, sometime some operations like flushing tlb
through FM need more than twice the regular timout of 100ms, so increase
the timeout to 1s on emulators.

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 9d5100f45bf1b0ca1e9788e6b15c7472f176a159..9e53ec1ed5bf74c1d7860d8ce88043894c843997 100644 (file)
@@ -2832,7 +2832,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 
        adev->usec_timeout = AMDGPU_MAX_USEC_TIMEOUT;
        if (amdgpu_emu_mode == 1)
-               adev->usec_timeout *= 2;
+               adev->usec_timeout *= 10;
        adev->gmc.gart_size = 512 * 1024 * 1024;
        adev->accel_working = false;
        adev->num_rings = 0;