diff mbox

[v2] drm/i915/gvt: add enable_execlists check before enable gvt

Message ID 20170309150711.GA11980@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chuanxiao.Dong March 9, 2017, 3:07 p.m. UTC
The GVT-g needs execlists to be enabled otherwise gvt should be
disabled. Add a check for enable_execlists before enabling gvt.

v2: use DRM_INFO in response to the user action

Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
---
 drivers/gpu/drm/i915/intel_gvt.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Zhenyu Wang March 13, 2017, 9:49 a.m. UTC | #1
On 2017.03.09 23:07:12 +0800, Chuanxiao Dong wrote:
> The GVT-g needs execlists to be enabled otherwise gvt should be
> disabled. Add a check for enable_execlists before enabling gvt.
> 
> v2: use DRM_INFO in response to the user action
> 
> Signed-off-by: Chuanxiao Dong <chuanxiao.dong@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 d23c0fc..8c04eca 100644
> --- a/drivers/gpu/drm/i915/intel_gvt.c
> +++ b/drivers/gpu/drm/i915/intel_gvt.c
> @@ -77,6 +77,11 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)
>  		goto bail;
>  	}
>  
> +	if (!i915.enable_execlists) {
> +		DRM_INFO("GPU guest virtualisation [GVT-g] disabled due to disabled execlist submission [i915.enable_execlists module parameter]\n");
> +		goto bail;
> +	}
> +
>  	/*
>  	 * We're not in host or fail to find a MPT module, disable GVT-g
>  	 */
> -- 

I just pick this up for gvt-fixes tree. Thanks.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_gvt.c b/drivers/gpu/drm/i915/intel_gvt.c
index d23c0fc..8c04eca 100644
--- a/drivers/gpu/drm/i915/intel_gvt.c
+++ b/drivers/gpu/drm/i915/intel_gvt.c
@@ -77,6 +77,11 @@  int intel_gvt_init(struct drm_i915_private *dev_priv)
 		goto bail;
 	}
 
+	if (!i915.enable_execlists) {
+		DRM_INFO("GPU guest virtualisation [GVT-g] disabled due to disabled execlist submission [i915.enable_execlists module parameter]\n");
+		goto bail;
+	}
+
 	/*
 	 * We're not in host or fail to find a MPT module, disable GVT-g
 	 */