All of lore.kernel.org
 help / color / mirror / Atom feed
From: changbin.du@intel.com
To: daniel.vetter@intel.com, jani.nikula@linux.intel.com,
	chris@chris-wilson.co.uk
Cc: airlied@linux.ie, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org,
	intel-gvt-dev@lists.freedesktop.org
Subject: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
Date: Wed, 24 May 2017 16:50:39 +0800	[thread overview]
Message-ID: <1495615839-20797-1-git-send-email-changbin.du@intel.com> (raw)

From: Changbin Du <changbin.du@intel.com>

At least we need one MPT module (currently only have one) selected
to get GVTg functional. When GVTg is enabled while no MPT selected,
the build just includes useless GVTg code. This doesn't make sense.

With this patch, a submenut is created under i915 as below:
  -*- Enable Intel GVT-g graphics virtualization host support
  <M> Enable KVM/VFIO support for Intel GVT-g

If no MPT is selected, GVTg will be disabled automatically.
  < > Enable KVM/VFIO support for Intel GVT-g

Signed-off-by: Changbin Du <changbin.du@intel.com>
---
 drivers/gpu/drm/i915/Kconfig | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index a5cd5da..e380a5d 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -91,12 +91,15 @@ config DRM_I915_USERPTR
 
 	  If in doubt, say "Y".
 
+menu "Intel GVT-g graphics virtualization host support"
+	depends on DRM_I915
+	depends on 64BIT
+
 config DRM_I915_GVT
-        bool "Enable Intel GVT-g graphics virtualization host support"
-        depends on DRM_I915
-        depends on 64BIT
-        default n
-        help
+	bool "Enable Intel GVT-g graphics virtualization host support"
+	default n
+	depends on DRM_I915_GVT_KVMGT
+	help
 	  Choose this option if you want to enable Intel GVT-g graphics
 	  virtualization technology host support with integrated graphics.
 	  With GVT-g, it's possible to have one integrated graphics
@@ -116,13 +119,14 @@ config DRM_I915_GVT
 
 config DRM_I915_GVT_KVMGT
 	tristate "Enable KVM/VFIO support for Intel GVT-g"
-	depends on DRM_I915_GVT
+	select DRM_I915_GVT
 	depends on KVM
 	depends on VFIO_MDEV && VFIO_MDEV_DEVICE
 	default n
 	help
 	  Choose this option if you want to enable KVMGT support for
 	  Intel GVT-g.
+endmenu
 
 menu "drm/i915 Debugging"
 depends on DRM_I915
-- 
2.7.4

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

             reply	other threads:[~2017-05-24  8:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24  8:50 changbin.du [this message]
2017-05-24  9:17 ` [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected Zhenyu Wang
2017-05-24  9:21 ` Chris Wilson
2017-05-24  9:36   ` Du, Changbin
2017-05-24  9:57 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-05-24 11:35 ` [PATCH] " Jani Nikula
2017-05-25  6:09   ` Du, Changbin
2017-05-26  9:58     ` Jani Nikula
2017-05-26 10:27       ` Du, Changbin

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=1495615839-20797-1-git-send-email-changbin.du@intel.com \
    --to=changbin.du@intel.com \
    --cc=airlied@linux.ie \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    /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.