]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu:only call flr_work under infinite timeout
authorMonk Liu <Monk.Liu@amd.com>
Wed, 26 Apr 2017 06:51:54 +0000 (14:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 May 2017 21:40:39 +0000 (17:40 -0400)
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c

index 69da52d7e6e2ada6b2e922d0c73162228d3710ee..bde3ca3c21c190fb526a3f0fe7a1706122a71f59 100644 (file)
@@ -266,12 +266,15 @@ static int xgpu_ai_mailbox_rcv_irq(struct amdgpu_device *adev,
 {
        int r;
 
-       /* see what event we get */
-       r = xgpu_ai_mailbox_rcv_msg(adev, IDH_FLR_NOTIFICATION);
-
-       /* only handle FLR_NOTIFY now */
-       if (!r)
-               schedule_work(&adev->virt.flr_work);
+       /* trigger gpu-reset by hypervisor only if TDR disbaled */
+       if (amdgpu_lockup_timeout == 0) {
+               /* see what event we get */
+               r = xgpu_ai_mailbox_rcv_msg(adev, IDH_FLR_NOTIFICATION);
+
+               /* only handle FLR_NOTIFY now */
+               if (!r)
+                       schedule_work(&adev->virt.flr_work);
+       }
 
        return 0;
 }
index 1cdf5cc8cc67d24b511a526dd6e4ec000eca49bf..171a658135b50795d3420eb6f50bd195fb79d35c 100644 (file)
@@ -537,12 +537,15 @@ static int xgpu_vi_mailbox_rcv_irq(struct amdgpu_device *adev,
 {
        int r;
 
-       /* see what event we get */
-       r = xgpu_vi_mailbox_rcv_msg(adev, IDH_FLR_NOTIFICATION);
-
-       /* only handle FLR_NOTIFY now */
-       if (!r)
-               schedule_work(&adev->virt.flr_work);
+       /* trigger gpu-reset by hypervisor only if TDR disbaled */
+       if (amdgpu_lockup_timeout == 0) {
+               /* see what event we get */
+               r = xgpu_vi_mailbox_rcv_msg(adev, IDH_FLR_NOTIFICATION);
+
+               /* only handle FLR_NOTIFY now */
+               if (!r)
+                       schedule_work(&adev->virt.flr_work);
+       }
 
        return 0;
 }