[PATCH v3] drm/i915/gvt: Fix mmio handler break on BXT/APL.

Zhenyu Wang zhenyuw at linux.intel.com
Mon Oct 19 08:10:45 UTC 2020


On 2020.10.16 13:29:13 +0800, Colin Xu wrote:
> - Remove dup mmio handler for BXT/APL. Otherwise mmio handler will fail
>   to init.
> - Add engine GPR with F_CMD_ACCESS since BXT/APL will load them via
>   LRI. Otherwise, guest will enter failsafe mode.
> 
> V2:
> Use RCS/BCS GPR macros instead of offset.
> Revise commit message.
> 
> V3:
> Use GEN8_RING_CS_GPR macros on ring base.
> 
> Signed-off-by: Colin Xu <colin.xu at intel.com>
> ---

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

>  drivers/gpu/drm/i915/gvt/handlers.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
> index 0031e7c43ea8..593cfc21b7b0 100644
> --- a/drivers/gpu/drm/i915/gvt/handlers.c
> +++ b/drivers/gpu/drm/i915/gvt/handlers.c
> @@ -3140,7 +3140,7 @@ static int init_skl_mmio_info(struct intel_gvt *gvt)
>  		 NULL, NULL);
>  
>  	MMIO_DFH(GAMT_CHKN_BIT_REG, D_KBL | D_CFL, F_CMD_ACCESS, NULL, NULL);
> -	MMIO_D(GEN9_CTX_PREEMPT_REG, D_SKL_PLUS);
> +	MMIO_D(GEN9_CTX_PREEMPT_REG, D_SKL_PLUS & ~D_BXT);
>  
>  	return 0;
>  }
> @@ -3314,6 +3314,16 @@ static int init_bxt_mmio_info(struct intel_gvt *gvt)
>  	MMIO_D(GEN8_PUSHBUS_SHIFT, D_BXT);
>  	MMIO_D(GEN6_GFXPAUSE, D_BXT);
>  	MMIO_DFH(GEN8_L3SQCREG1, D_BXT, F_CMD_ACCESS, NULL, NULL);
> +	MMIO_DFH(GEN8_L3CNTLREG, D_BXT, F_CMD_ACCESS, NULL, NULL);
> +	MMIO_DFH(_MMIO(0x20D8), D_BXT, F_CMD_ACCESS, NULL, NULL);
> +	MMIO_F(GEN8_RING_CS_GPR(RENDER_RING_BASE, 0), 0x40, F_CMD_ACCESS,
> +	       0, 0, D_BXT, NULL, NULL);
> +	MMIO_F(GEN8_RING_CS_GPR(GEN6_BSD_RING_BASE, 0), 0x40, F_CMD_ACCESS,
> +	       0, 0, D_BXT, NULL, NULL);
> +	MMIO_F(GEN8_RING_CS_GPR(BLT_RING_BASE, 0), 0x40, F_CMD_ACCESS,
> +	       0, 0, D_BXT, NULL, NULL);
> +	MMIO_F(GEN8_RING_CS_GPR(VEBOX_RING_BASE, 0), 0x40, F_CMD_ACCESS,
> +	       0, 0, D_BXT, NULL, NULL);
>  
>  	MMIO_DFH(GEN9_CTX_PREEMPT_REG, D_BXT, F_CMD_ACCESS, NULL, NULL);
>  
> -- 
> 2.28.0
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 

$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/20201019/f8e9cb6e/attachment.sig>


More information about the intel-gvt-dev mailing list