From patchwork Wed May 24 08:50:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Du, Changbin" X-Patchwork-Id: 9745505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79ECF60209 for ; Wed, 24 May 2017 08:55:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CD952886B for ; Wed, 24 May 2017 08:55:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6191C2891A; Wed, 24 May 2017 08:55:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DDC592886B for ; Wed, 24 May 2017 08:55:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8705E6E57F; Wed, 24 May 2017 08:55:37 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id D4D656E57F; Wed, 24 May 2017 08:55:36 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2017 01:55:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,385,1491289200"; d="scan'208";a="265758198" Received: from gvt-dell.bj.intel.com ([10.238.135.155]) by fmsmga004.fm.intel.com with ESMTP; 24 May 2017 01:55:34 -0700 From: changbin.du@intel.com To: daniel.vetter@intel.com, jani.nikula@linux.intel.com, chris@chris-wilson.co.uk Date: Wed, 24 May 2017 16:50:39 +0800 Message-Id: <1495615839-20797-1-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 Cc: airlied@linux.ie, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Changbin Du 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 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 --- 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