@@ -341,6 +341,10 @@ static int gdrst_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
341
341
gvt_dbg_mmio ("vgpu%d: request VCS2 Reset\n" , vgpu -> id );
342
342
engine_mask |= BIT (VCS1 );
343
343
}
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
+ }
344
348
engine_mask &= INTEL_INFO (vgpu -> gvt -> dev_priv )-> engine_mask ;
345
349
}
346
350
@@ -1636,6 +1640,16 @@ static int edp_psr_imr_iir_write(struct intel_vgpu *vgpu,
1636
1640
return 0 ;
1637
1641
}
1638
1642
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
+
1639
1653
static int mmio_read_from_hw (struct intel_vgpu * vgpu ,
1640
1654
unsigned int offset , void * p_data , unsigned int bytes )
1641
1655
{
@@ -2672,6 +2686,8 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
2672
2686
2673
2687
MMIO_DH (EDP_PSR_IMR , D_BDW_PLUS , NULL , edp_psr_imr_iir_write );
2674
2688
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
+
2675
2691
return 0 ;
2676
2692
}
2677
2693
0 commit comments