drm/i915/gvt: GVT-g options sanitize series
Subsystems (2)
cover drm/i915/gvt: GVT-g options sanitize series
In this series, options sanitize API is added for GVT-g, and GVT-g init will fail with -EIO if detected incompatible i915 parameters.
Chuanxiao Dong (3):
drm/i915/gvt: Add gvt options sanitize function drm/i915/gvt: Return -EIO if host enable_execlists not enabled when
loading GVT-g
drm/i915/gvt: Return -EIO if host GuC submission is enabled when
loading GVT-g
drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_gvt.c | 43 ++++++++++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_gvt.h | 5 +++++ 3 files changed, 39 insertions(+), 11 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 drm/i915/gvt: Add gvt options sanitize function
The intel_gvt_sanitize_options will sanitize the GVT-g related options before doing GVT-g init.
--- 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(-)
drivers/gpu/drm/i915/i915_drv.c +2 -0
@@ -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); }/**
drivers/gpu/drm/i915/intel_gvt.c +26 -10
@@ -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; + } + +return ; +bail: + i915.enable_gvt =0 ; +} + +/** * intel_gvt_init - initialize GVT components * @dev_priv: drm i915 private data *
@@ -69,16 +95,6 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)return 0 ; } -if (intel_vgpu_active (dev_priv)) { -DRM_DEBUG_DRIVER ("GVT-g is disabled for guest\n" ); - goto bail; - } - -if (!is_supported_device (dev_priv)) { -DRM_DEBUG_DRIVER ("Unsupported device. GVT-g is disabled\n" ); - 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;
drivers/gpu/drm/i915/intel_gvt.h +5 -0
@@ -32,6 +32,7 @@ void intel_gvt_cleanup(struct drm_i915_private *dev_priv);int intel_gvt_init_device (struct drm_i915_private *dev_priv);void intel_gvt_clean_device (struct drm_i915_private *dev_priv);int intel_gvt_init_host (void ); +void intel_gvt_sanitize_options (struct drm_i915_private *dev_priv);#else static inline int intel_gvt_init (struct drm_i915_private *dev_priv) {
@@ -40,6 +41,10 @@ static inline int intel_gvt_init(struct drm_i915_private *dev_priv)static inline void intel_gvt_cleanup (struct drm_i915_private *dev_priv) { } + +static inline void intel_gvt_sanitize_options (struct drm_i915_private *dev_priv) +{ +}#endif #endif /* _INTEL_GVT_H_ */
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] drm/i915/gvt: Add gvt options sanitize function
Quoted 42 lines · Chuanxiao Dong
The
intel_gvt_sanitize_optionswill sanitize the GVT-g related options before doing GVT-g init.Suggested-by Joonas Lahtinen <[email protected]>Cc Joonas Lahtinen <[email protected]>Signed-off-by Chuanxiao Dong <[email protected]>--- 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(-)drivers/gpu/drm/i915/i915_drv.c +2
-0@@ -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); }/** drivers/gpu/drm/i915/intel_gvt.c +9
-0@@ -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 ;
drivers/gpu/drm/i915/intel_gvt.c static bool is_supported_device(struct drm_i915_private *dev_priv) · line 72
Quoted 10 lines
drivers/gpu/drm/i915/intel_gvt.c +10
-0+ +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).
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] drm/i915/gvt: Add gvt options sanitize function
Quoted 69 lines
-----Original Message-----
From: intel-gvt-dev [mailto:[email protected]] On Behalf Of Chris Wilson
Sent: Friday, May 26, 2017 7:09 PM
To: Dong, Chuanxiao <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915/gvt: Add gvt options sanitize functiondrivers/gpu/drm/i915/i915_drv.c static void intel_sanitize_options(struct
Quoted 18 lines · Chuanxiao Dong
The
intel_gvt_sanitize_optionswill sanitize the GVT-g related options before doing GVT-g init.Suggested-by Joonas Lahtinen <[email protected]>Cc Joonas Lahtinen <[email protected]>Signed-off-by Chuanxiao Dong <[email protected]>--- 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(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_drv.cindex 72fb47a..9c59b22 100644drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -997,6 +997,8 @@ static void intel_sanitize_options(struct
drm_i915_private*dev_priv)Quoted 26 lines
drivers/gpu/drm/i915/i915_drv.c +2
-0DRM_DEBUG_DRIVER ("use GPU semaphores? %s\n" ,yesno (i915.semaphores));intel_uc_sanitize_options (dev_priv); + +intel_gvt_sanitize_options (dev_priv); }/**
drivers/gpu/drm/i915/intel_gvt.c +8
-0@@ -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 ;drivers/gpu/drm/i915/intel_gvt.c static bool is_supported_device(struct · line 71
Quoted 10 lines
drivers/gpu/drm/i915/intel_gvt.c +10
-0+ +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).
Quoted 2 lines
Reviewed-by Chris Wilson <[email protected]> -Chris
Thanks Chris. Patch 2/3 and 3/3 will be updated in v2 to use DRM_ERROR.
Thanks
Chuanxiao
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g
In reply to Chuanxiao DongGVT-g relies on the enable_execlists parameter in i915. If this option is not enabled for GVT-g, should return -EIO to make i915 driver loading failed.
--- drivers/gpu/drm/i915/intel_gvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_gvt.c +1 -1
@@ -97,7 +97,7 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)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; +return -EIO ; }/*
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g
Quoted 16 lines · Chuanxiao Dong
GVT-g relies on the
enable_execlistsparameter in i915. If this option is not enabled for GVT-g, should return-EIOto make i915 driver loading failed.Suggested-by Joonas Lahtinen <[email protected]>Cc Joonas Lahtinen <[email protected]>Signed-off-by Chuanxiao Dong <[email protected]>--- drivers/gpu/drm/i915/intel_gvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_gvt.c +0
-0
drivers/gpu/drm/i915/intel_gvt.c int intel_gvt_init(struct drm_i915_private *dev_priv) · line 100
Quoted 5 lines
drivers/gpu/drm/i915/intel_gvt.c +1
-1@@ -97,7 +97,7 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)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; +return -EIO ;
Hmm, interesting debate as to whether or not you still want to set i915.enable_gvt=0 to indicate gvt being lost. Since this will cause the driver to fail to load, it should be now DRM_ERROR("and the error message changed to reflect the fatal failure!") and having modprobe report -EIO with i915.enable_gvt still to 1 seems like the best approach. -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g
Quoted 33 lines
-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, May 26, 2017 5:35 PM
To: Dong, Chuanxiao <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915/gvt: Return-EIOif hostenable_execlistsnot enabled when loading GVT-gQuoted 17 lines · Chuanxiao Dong
GVT-g relies on the
enable_execlistsparameter in i915. If this option is not enabled for GVT-g, should return-EIOto make i915 driver loading failed.Suggested-by Joonas Lahtinen <[email protected]>Cc Joonas Lahtinen <[email protected]>Signed-off-by Chuanxiao Dong <[email protected]>--- drivers/gpu/drm/i915/intel_gvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_gvt.c +0
-0drivers/gpu/drm/i915/intel_gvt.c int intel_gvt_init(struct drm_i915_private · line 100
Quoted 4 lines
drivers/gpu/drm/i915/intel_gvt.c +0
-0@@ -97,7 +97,7 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)if (!i915.enable_execlists) { DRM_INFO("GPU guest virtualisation [GVT-g] disabled due todisabled execlist submission [i915.enable_execlists module parameter]\n");
Quoted 9 lines
drivers/gpu/drm/i915/intel_gvt.c int intel_gvt_init(struct drm_i915_private *dev_priv) · line 100
Quoted 2 lines
drivers/gpu/drm/i915/intel_gvt.c +1
-1- goto bail; +return -EIO ;Hmm, interesting debate as to whether or not you still want to set i915.enable_gvt=0 to indicate gvt being lost. Since this will cause the driver to fail to load, it should be now
DRM_ERROR("and the error message changed to reflect the fatal failure!")and having modprobe report-EIOwith i915.enable_gvt still to 1 seems like the best approach.
-Chris
Yes, agree with keeping i915.enable_gvt to be 1, this is also the current solution. For the error message, how about DRM_ERROR("i915 GVT-g driver loading failed due to disabled execlists mode.\n")?
Regarding fail with -EIO, as we can take i915.enable_gvt as a single feature of intel i915 GPU, is it still reasonable to return -EIO to disable the whole i915 driver? It is something like two features A and B in i915, as B relies on A, so B should be disabled if detected feature A is not enable, but not just making the whole i915 stack disabled.
Thanks
Chuanxiao
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/gvt: Return -EIO if host GuC submission is enabled when loading GVT-g
In reply to Chuanxiao DongCurrently GVT-g cannot work properly when host GuC submission is enabled, so make i915 driver loading failed in this case.
--- drivers/gpu/drm/i915/intel_gvt.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_gvt.c +5 -0
@@ -100,6 +100,11 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)return -EIO ; } +if (i915.enable_guc_submission) { +DRM_INFO ("Graphics virtualization is not yet supported with GuC submission" ); +return -EIO ; + } +/* * We're not in host or fail to find a MPT module, disable GVT-g */
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/gvt: Return -EIO if host GuC submission is enabled when loading GVT-g
Quoted 18 lines · Chuanxiao Dong
Currently GVT-g cannot work properly when host GuC submission is enabled, so make i915 driver loading failed in this case.
Suggested-by Joonas Lahtinen <[email protected]>Suggested-by Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Chris Wilson <[email protected]>Cc Zhenyu Wang <[email protected]>Signed-off-by Chuanxiao Dong <[email protected]>--- drivers/gpu/drm/i915/intel_gvt.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/i915/intel_gvt.c +0
-0
drivers/gpu/drm/i915/intel_gvt.c int intel_gvt_init(struct drm_i915_private *dev_priv) · line 106
Quoted 7 lines
drivers/gpu/drm/i915/intel_gvt.c +4
-0@@ -100,6 +100,11 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)return -EIO ; } +if (i915.enable_guc_submission) { +DRM_INFO ("Graphics virtualization is not yet supported with GuC submission" ); +return -EIO ; + }
Again, this is an actual DRM_ERROR as it is fatal. -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/gvt: GVT-g options sanitize series
In reply to Chuanxiao Dong== Series Details ==
== Series Details ==
Series: drm/i915/gvt: GVT-g options sanitize series
URL : https://patchwork.freedesktop.org/series/24934/
State : failure
== Summary ==
Series 24934v1 drm/i915/gvt: GVT-g options sanitize series
https://patchwork.freedesktop.org/api/1.0/series/24934/revisions/1/mbox/
Test kms_busy:
Subgroup basic-flip-default-c:
pass -> DMESG-WARN (fi-skl-6700hq) fdo#101144 +1
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
pass -> FAIL (fi-skl-6700hq)
Subgroup basic-busy-flip-before-cursor-legacy:
pass -> FAIL (fi-skl-6700hq)
Subgroup basic-flip-after-cursor-atomic:
pass -> FAIL (fi-skl-6700hq)
Subgroup basic-flip-after-cursor-legacy:
pass -> FAIL (fi-skl-6700hq)
Subgroup basic-flip-after-cursor-varying-size:
pass -> FAIL (fi-skl-6700hq)
Subgroup basic-flip-before-cursor-atomic:
pass -> FAIL (fi-skl-6700hq)
Subgroup basic-flip-before-cursor-legacy:
pass -> FAIL (fi-skl-6700hq)
Subgroup basic-flip-before-cursor-varying-size:
pass -> FAIL (fi-skl-6700hq)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> INCOMPLETE (fi-bdw-gvtdvm) fdo#99938fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fdo#99938 https://bugs.freedesktop.org/show_bug.cgi?id=99938
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:447s fi-bdw-gvtdvm total:236 pass:223 dwarn:3 dfail:0 fail:0 skip:9 fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:580s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:516s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:489s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:481s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:414s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:416s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:417s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:500s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:468s fi-kbl-7500u total:278 pass:255 dwarn:5 dfail:0 fail:0 skip:18 time:465s fi-kbl-7560u total:278 pass:263 dwarn:5 dfail:0 fail:0 skip:10 time:569s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:458s fi-skl-6700hq total:278 pass:230 dwarn:1 dfail:0 fail:25 skip:22 time:406s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:464s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:495s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:437s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:530s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:404s
d47b71fd942d8a88da311863a6cfc2fd73ba1234 drm-tip: 2017y-05m-25d-20h-54m-23s UTC integration manifest 2cb6222 drm/i915/gvt: Return -EIO if host GuC submission is enabled when loading GVT-g 9c8e1cd drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g 3b8026a drm/i915/gvt: Add gvt options sanitize function
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4814/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
v2 cover drm/i915/gvt: GVT-g options sanitize series
In reply to Chuanxiao DongIn this series, options sanitize API is added for GVT-g, and GVT-g init will fail with -EIO if detected incompatible i915 parameters.
Chuanxiao Dong (3):
drm/i915/gvt: Add gvt options sanitize function drm/i915/gvt: Return -EIO if host enable_execlists not enabled when
loading GVT-g
drm/i915/gvt: Return -EIO if host GuC submission is enabled when
loading GVT-g
drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_gvt.c | 43 ++++++++++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_gvt.h | 5 +++++ 3 files changed, 39 insertions(+), 11 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/3 drm/i915/gvt: Add gvt options sanitize function
The intel_gvt_sanitize_options will sanitize the GVT related options before doing initialize the GVT.
--- 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(-)
drivers/gpu/drm/i915/i915_drv.c +2 -0
@@ -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); }/**
drivers/gpu/drm/i915/intel_gvt.c +26 -10
@@ -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; + } + +return ; +bail: + i915.enable_gvt =0 ; +} + +/** * intel_gvt_init - initialize GVT components * @dev_priv: drm i915 private data *
@@ -69,16 +95,6 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)return 0 ; } -if (intel_vgpu_active (dev_priv)) { -DRM_DEBUG_DRIVER ("GVT-g is disabled for guest\n" ); - goto bail; - } - -if (!is_supported_device (dev_priv)) { -DRM_DEBUG_DRIVER ("Unsupported device. GVT-g is disabled\n" ); - 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;
drivers/gpu/drm/i915/intel_gvt.h +5 -0
@@ -32,6 +32,7 @@ void intel_gvt_cleanup(struct drm_i915_private *dev_priv);int intel_gvt_init_device (struct drm_i915_private *dev_priv);void intel_gvt_clean_device (struct drm_i915_private *dev_priv);int intel_gvt_init_host (void ); +void intel_gvt_sanitize_options (struct drm_i915_private *dev_priv);#else static inline int intel_gvt_init (struct drm_i915_private *dev_priv) {
@@ -40,6 +41,10 @@ static inline int intel_gvt_init(struct drm_i915_private *dev_priv)static inline void intel_gvt_cleanup (struct drm_i915_private *dev_priv) { } + +static inline void intel_gvt_sanitize_options (struct drm_i915_private *dev_priv) +{ +}#endif #endif /* _INTEL_GVT_H_ */
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 2/3 drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g
In reply to Chuanxiao DongGVT-g relies on the enable_execlists parameter in i915. If this option is not enabled for GVT-g, should return -EIO to make i915 driver loading failed.
v2:
- Use DMR_ERROR as it is a fatal message. (Chris)
--- drivers/gpu/drm/i915/intel_gvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_gvt.c +2 -2
@@ -96,8 +96,8 @@ int intel_gvt_init(struct drm_i915_private *dev_priv) }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; +DRM_ERROR ("i915 GVT-g loading failed due to disabled execlists mode\n" ); +return -EIO ; }/*
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 3/3 drm/i915/gvt: Return -EIO if host GuC submission is enabled when loading GVT-g
In reply to Chuanxiao DongCurrently GVT-g cannot work properly when host GuC submission is enabled, so make the driver loading failed in this case.
v2:
- use DRM_ERROR as it is a fatal message. (Chris)
--- drivers/gpu/drm/i915/intel_gvt.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_gvt.c +5 -0
@@ -100,6 +100,11 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)return -EIO ; } +if (i915.enable_guc_submission) { +DRM_ERROR ("i915 GVT-g loading failed due to Graphics virtualization is not yet supported with GuC submission\n" ); +return -EIO ; + } +/* * We're not in host or fail to find a MPT module, disable GVT-g */
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/gvt: Add gvt options sanitize function
In reply to Chuanxiao Dong== Series Details ==
== Series Details ==
Series: series starting with [v2,1/3] drm/i915/gvt: Add gvt options sanitize function
URL : https://patchwork.freedesktop.org/series/24982/
State : success
== Summary ==
Series 24982v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/24982/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007
Test kms_flip:
Subgroup basic-flip-vs-dpms:
dmesg-warn -> PASS (fi-skl-6700hq) fdo#101144
Test kms_force_connector_basic:
Subgroup force-connector-state:
pass -> SKIP (fi-ivb-3520m) fdo#101048 +3fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fdo#101048 https://bugs.freedesktop.org/show_bug.cgi?id=101048
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:445s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:440s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:567s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:514s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:485s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:479s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:434s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:415s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:417s fi-ivb-3520m total:278 pass:256 dwarn:0 dfail:0 fail:0 skip:22 time:482s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:461s fi-kbl-7500u total:278 pass:255 dwarn:5 dfail:0 fail:0 skip:18 time:464s fi-kbl-7560u total:278 pass:263 dwarn:5 dfail:0 fail:0 skip:10 time:571s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:466s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:577s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:465s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:493s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:437s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:531s fi-snb-2600 total:278 pass:248 dwarn:0 dfail:0 fail:1 skip:29 time:396s
bf9722dc7ed767dd56571e82950e533f69d9318e drm-tip: 2017y-05m-26d-23h-15m-13s UTC integration manifest 09af61c drm/i915/gvt: Return -EIO if host GuC submission is enabled when loading GVT-g b87c881 drm/i915/gvt: Return -EIO if host enable_execlists not enabled when loading GVT-g 2913387 drm/i915/gvt: Add gvt options sanitize function
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4826/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson
Reviewed-byRe: ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/gvt: Add gvt options sanitize function
Quoted 5 lines · Patchwork
== Series Details ==
Series: series starting with [v2,1/3] drm/i915/gvt: Add gvt options sanitize function
URL : https://patchwork.freedesktop.org/series/24982/
State : success
Sigh. Had to resort to checking pw, but it lgtm.
The series is
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerRe: ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/gvt: Add gvt options sanitize function
Quoted 11 lines · Chris Wilson
Quoted 6 lines · Patchwork
== Series Details ==
Series: series starting with [v2,1/3] drm/i915/gvt: Add gvt options sanitize function URL : https://patchwork.freedesktop.org/series/24982/
State : successSigh. Had to resort to checking pw, but it lgtm.
The series isReviewed-by Chris Wilson <[email protected]>
Fixed the order of the Suggested-by, Signed-off-by etc. to be in chronological order and merged. Thanks for the patch and review.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx