[PATCH v3] drm/i915/gvt: Fix guest boot warning

Zhenyu Wang zhenyuw at linux.intel.com
Tue Dec 17 03:10:58 UTC 2019


On 2019.12.17 00:02:55 +0800, Gao Fred wrote:
>     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 <fred.gao at intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/handlers.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
> index bb9fe6bf5275..c5e870a83d68 100644
> --- a/drivers/gpu/drm/i915/gvt/handlers.c
> +++ b/drivers/gpu/drm/i915/gvt/handlers.c
> @@ -341,6 +341,10 @@ static int gdrst_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
>  			gvt_dbg_mmio("vgpu%d: request VCS2 Reset\n", vgpu->id);
>  			engine_mask |= BIT(VCS1);
>  		}
> +		if (data & GEN9_GRDOM_GUC) {
> +			gvt_dbg_mmio("vgpu%d: request GUC Reset\n", vgpu->id);
> +			vgpu_vreg_t(vgpu, GUC_STATUS) |= GS_MIA_IN_RESET;
> +		}
>  		engine_mask &= INTEL_INFO(vgpu->gvt->dev_priv)->engine_mask;
>  	}
>  
> @@ -1636,6 +1640,15 @@ static int edp_psr_imr_iir_write(struct intel_vgpu *vgpu,
>  	return 0;
>  }
>  
> +static int guc_status_read(struct intel_vgpu *vgpu,
> +		unsigned int offset, void *p_data, unsigned int bytes)
> +{
> +	/* keep MIA_IN_RESET before clearing */
> +	read_vreg(vgpu, offset, p_data, bytes);
> +	vgpu_vreg(vgpu, offset) &= ~GS_MIA_IN_RESET;
> +	return 0;
> +}

yeah, sorry for misreading this previously, as driver does expect
reset bit set actually. So,

Reviewed-by: Zhenyu Wang <zhenyuw at linux.intel.com>

Thanks!

> +
>  static int mmio_read_from_hw(struct intel_vgpu *vgpu,
>  		unsigned int offset, void *p_data, unsigned int bytes)
>  {
> @@ -2672,6 +2685,8 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
>  
>  	MMIO_DH(EDP_PSR_IMR, D_BDW_PLUS, NULL, edp_psr_imr_iir_write);
>  	MMIO_DH(EDP_PSR_IIR, D_BDW_PLUS, NULL, edp_psr_imr_iir_write);
> +	MMIO_DH(GUC_STATUS, D_ALL, guc_status_read, NULL);
> +
>  	return 0;
>  }
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20191217/4da1b4ef/attachment.sig>


More information about the intel-gvt-dev mailing list