All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dong, Chuanxiao" <chuanxiao.dong@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-gvt-dev@lists.freedesktop.org"
	<intel-gvt-dev@lists.freedesktop.org>
Subject: Re: [PATCH 1/3] drm/i915/gvt: Add gvt options sanitize function
Date: Sat, 27 May 2017 09:39:12 +0000	[thread overview]
Message-ID: <17296D9F8FF2234F831FC3DF505A87A96327ED77@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20170526110834.GW10827@nuc-i3427.alporthouse.com>

> -----Original Message-----
> From: intel-gvt-dev [mailto:intel-gvt-dev-bounces@lists.freedesktop.org] On
> Behalf Of Chris Wilson
> Sent: Friday, May 26, 2017 7:09 PM
> To: Dong, Chuanxiao <chuanxiao.dong@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; intel-gvt-dev@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915/gvt: Add gvt options sanitize
> function
> 
> On Fri, May 26, 2017 at 11:04:17AM +0800, Chuanxiao Dong wrote:
> > The intel_gvt_sanitize_options will sanitize the GVT-g related options
> > before doing GVT-g init.
> >
> > Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c  |  2 ++
> > drivers/gpu/drm/i915/intel_gvt.c | 36
> > ++++++++++++++++++++++++++----------
> >  drivers/gpu/drm/i915/intel_gvt.h |  5 +++++
> >  3 files changed, 33 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > b/drivers/gpu/drm/i915/i915_drv.c index 72fb47a..9c59b22 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -997,6 +997,8 @@ static void intel_sanitize_options(struct
> drm_i915_private *dev_priv)
> >  	DRM_DEBUG_DRIVER("use GPU semaphores? %s\n",
> > yesno(i915.semaphores));
> >
> >  	intel_uc_sanitize_options(dev_priv);
> > +
> > +	intel_gvt_sanitize_options(dev_priv);
> >  }
> >
> >  /**
> > diff --git a/drivers/gpu/drm/i915/intel_gvt.c
> > b/drivers/gpu/drm/i915/intel_gvt.c
> > index e1ab643..dde9c78 100644
> > --- a/drivers/gpu/drm/i915/intel_gvt.c
> > +++ b/drivers/gpu/drm/i915/intel_gvt.c
> > @@ -51,6 +51,32 @@ static bool is_supported_device(struct
> > drm_i915_private *dev_priv)  }
> >
> >  /**
> > + * intel_gvt_sanitize_options - sanitize GVT related options
> > + * @dev_priv: drm i915 private data
> > + *
> > + * This function is called at the i915 options sanitize stage.
> > + */
> > +void intel_gvt_sanitize_options(struct drm_i915_private *dev_priv) {
> > +	if (!i915.enable_gvt)
> > +		return;
> > +
> > +	if (intel_vgpu_active(dev_priv)) {
> > +		DRM_INFO("GVT-g is disabled for guest\n");
> > +		goto bail;
> > +	}
> > +
> > +	if (!is_supported_device(dev_priv)) {
> > +		DRM_INFO("Unsupported device. GVT-g is disabled\n");
> > +		goto bail;
> > +	}
> 
> Good. I came back to check that we didn't trigger an EIO if the device wasn't
> supported (and only an EIO if the user gave conflicting params).
> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
> 
Thanks Chris. Patch 2/3 and 3/3 will be updated in v2 to use DRM_ERROR.

Thanks
Chuanxiao
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-05-27  9:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26  3:04 [PATCH 0/3] drm/i915/gvt: GVT-g options sanitize series Chuanxiao Dong
2017-05-26  3:04 ` [PATCH 1/3] drm/i915/gvt: Add gvt options sanitize function Chuanxiao Dong
2017-05-26 11:08   ` Chris Wilson
2017-05-27  9:39     ` Dong, Chuanxiao [this message]
2017-05-26  3:04 ` [PATCH 2/3] drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g Chuanxiao Dong
2017-05-26  9:35   ` Chris Wilson
2017-05-26  9:55     ` Dong, Chuanxiao
2017-05-26  3:04 ` [PATCH 3/3] drm/i915/gvt: Return -EIO if host GuC submission is " Chuanxiao Dong
2017-05-26  9:36   ` Chris Wilson
2017-05-26  3:24 ` ✗ Fi.CI.BAT: failure for drm/i915/gvt: GVT-g options sanitize series Patchwork
2017-05-27  9:44 ` [PATCH v2 0/3] " Chuanxiao Dong
2017-05-27 10:01   ` ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/gvt: Add gvt options sanitize function Patchwork
2017-05-30 12:45     ` Chris Wilson
2017-05-30 13:10       ` Joonas Lahtinen
2017-05-27  9:44 ` [PATCH v2 1/3] " Chuanxiao Dong
2017-05-27  9:44 ` [PATCH v2 2/3] drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g Chuanxiao Dong
2017-05-27  9:44 ` [PATCH v2 3/3] drm/i915/gvt: Return -EIO if host GuC submission is " Chuanxiao Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17296D9F8FF2234F831FC3DF505A87A96327ED77@SHSMSX103.ccr.corp.intel.com \
    --to=chuanxiao.dong@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.