Skip to content

Commit 5e822e4

Browse files
fred1gaozhenyw
authored andcommitted
drm/i915/gvt: Fix guest boot warning
Simulate MIA core in reset status once GUC engine is reset. v2: 1. use vgpu_vreg_t() function, 2. clear MIA_IN_RESET after reading. (Zhenyu) v3: add comments. (Zhenyu) Signed-off-by: Gao Fred <[email protected]> Reviewed-by: Zhenyu Wang <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9f674c8 commit 5e822e4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/gpu/drm/i915/gvt/handlers.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ static int gdrst_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
341341
gvt_dbg_mmio("vgpu%d: request VCS2 Reset\n", vgpu->id);
342342
engine_mask |= BIT(VCS1);
343343
}
344+
if (data & GEN9_GRDOM_GUC) {
345+
gvt_dbg_mmio("vgpu%d: request GUC Reset\n", vgpu->id);
346+
vgpu_vreg_t(vgpu, GUC_STATUS) |= GS_MIA_IN_RESET;
347+
}
344348
engine_mask &= INTEL_INFO(vgpu->gvt->dev_priv)->engine_mask;
345349
}
346350

@@ -1636,6 +1640,16 @@ static int edp_psr_imr_iir_write(struct intel_vgpu *vgpu,
16361640
return 0;
16371641
}
16381642

1643+
static int guc_status_read(struct intel_vgpu *vgpu,
1644+
unsigned int offset, void *p_data,
1645+
unsigned int bytes)
1646+
{
1647+
/* keep MIA_IN_RESET before clearing */
1648+
read_vreg(vgpu, offset, p_data, bytes);
1649+
vgpu_vreg(vgpu, offset) &= ~GS_MIA_IN_RESET;
1650+
return 0;
1651+
}
1652+
16391653
static int mmio_read_from_hw(struct intel_vgpu *vgpu,
16401654
unsigned int offset, void *p_data, unsigned int bytes)
16411655
{
@@ -2672,6 +2686,8 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
26722686

26732687
MMIO_DH(EDP_PSR_IMR, D_BDW_PLUS, NULL, edp_psr_imr_iir_write);
26742688
MMIO_DH(EDP_PSR_IIR, D_BDW_PLUS, NULL, edp_psr_imr_iir_write);
2689+
MMIO_DH(GUC_STATUS, D_ALL, guc_status_read, NULL);
2690+
26752691
return 0;
26762692
}
26772693

0 commit comments

Comments
 (0)