[Intel-gfx] [PATCH v2] drm/i915/gvt: disable GVT-g if host GuC submission is enabled

Dong, Chuanxiao chuanxiao.dong at intel.com
Thu May 11 02:33:48 UTC 2017



> -----Original Message-----
> From: Joonas Lahtinen [mailto:joonas.lahtinen at linux.intel.com]
> Sent: Wednesday, May 10, 2017 8:48 PM
> To: Dong, Chuanxiao <chuanxiao.dong at intel.com>; intel-gvt-
> dev at lists.freedesktop.org; intel-gfx at lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/gvt: disable GVT-g if host GuC
> submission is enabled
> 
> On ti, 2017-05-09 at 18:11 +0800, Chuanxiao Dong wrote:
> > Currently GVT-g cannot work properly when host GuC submission is
> > enabled, so disable GVT in this case.
> >
> > v2: update the user message (Joonas)
> >
> > Cc: Zhenyu Wang <zhenyuw at linux.intel.com>
> > Signed-off-by: Chuanxiao Dong <chuanxiao.dong at intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_gvt.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_gvt.c
> > b/drivers/gpu/drm/i915/intel_gvt.c
> > index e1ab643..d85742c 100644
> > --- a/drivers/gpu/drm/i915/intel_gvt.c
> > +++ b/drivers/gpu/drm/i915/intel_gvt.c
> > @@ -84,6 +84,11 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)
> >  		goto bail;
> >  	}
> >
> > +	if (i915.enable_guc_submission) {
> > +		DRM_INFO("GPU guest virtualisation [GVT-g] disabled as
> Graphics virtualization is not yet supported with GuC submission
> [i915.enable_guc_submission module parameter]\n");
> > +		goto bail;
> > +	}
> 
> As discussed earlier, driver loading should fail with -EIO when incompatible
> options are specified.

Sorry for not getting why should fail with -EIO? By looking into the source, Intel_gvt_init is part of i915 driver loading, and fail with -EIO will make i915 driver failed to load. 
The loading of intel gvt is in intel_gvt_init, and "goto bail" can skip gvt loading which should be the purpose of disabling gvt when incompatible options are specified, so it doesn't rely on the return value of intel_gvt_init.

> 
> Also, the message is now even more cryptic, just:
> 
> 	DRM_INFO("Graphics virtualization is not yet supported with GuC
> submission");

Ah...It is my misunderstanding of your last comment. Will fix this.

> 
> Should do.
> 
> Please Cc: the people who've previously commented on the patch to make it
> easier to spot new versions.

Sorry for missing this.

Thanks
Chuanxiao


More information about the Intel-gfx mailing list