aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
diff options
context:
space:
mode:
authorPixel Ding <Pixel.Ding@amd.com>2017-02-22 22:10:33 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-04-28 17:32:40 -0400
commitee73164a0d8d2fd98f666a5dd35da1d9a19ec009 (patch)
tree9ada31e6635856fb950465546a6f1dee44e25f63 /drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
parentad2fed9ad5907c35e132e43420a0e47ab22350f0 (diff)
drm/amdgpu/virt: don't check VALID bit for FLR completion message
The interrupt after FLR is missed sometimes due to hardware reason, so guest driver get the notification of FLR completion via polling message. Then host doesn't write VALID bit to avoid sending interrupt, otherwise the completion will be handled twice. So there's a valid message without VALID bit for FLR completion, driver should handle it without checking. Signed-off-by: Pixel Ding <Pixel.Ding@amd.com> Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
index 70a3dd13cb02..7bdc51b02326 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
@@ -368,9 +368,12 @@ static int xgpu_vi_mailbox_rcv_msg(struct amdgpu_device *adev,
368 u32 reg; 368 u32 reg;
369 u32 mask = REG_FIELD_MASK(MAILBOX_CONTROL, RCV_MSG_VALID); 369 u32 mask = REG_FIELD_MASK(MAILBOX_CONTROL, RCV_MSG_VALID);
370 370
371 reg = RREG32_NO_KIQ(mmMAILBOX_CONTROL); 371 /* workaround: host driver doesn't set VALID for CMPL now */
372 if (!(reg & mask)) 372 if (event != IDH_FLR_NOTIFICATION_CMPL) {
373 return -ENOENT; 373 reg = RREG32_NO_KIQ(mmMAILBOX_CONTROL);
374 if (!(reg & mask))
375 return -ENOENT;
376 }
374 377
375 reg = RREG32_NO_KIQ(mmMAILBOX_MSGBUF_RCV_DW0); 378 reg = RREG32_NO_KIQ(mmMAILBOX_MSGBUF_RCV_DW0);
376 if (reg != event) 379 if (reg != event)