All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix GVT-g PVINFO version compatibility check
@ 2017-06-05  3:00 Zhenyu Wang
  2017-06-05  3:25 ` ✗ Fi.CI.BAT: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Zhenyu Wang @ 2017-06-05  3:00 UTC (permalink / raw)
  To: intel-gfx, intel-gvt-dev
  Cc: Chuanxiao Dong, Joonas Lahtinen, stable, #, 4.10+

Current it's strictly checked if PVINFO version matches 1.0
for GVT-g i915 guest which doesn't help for compatibility at
all and forces GVT-g host can't extend PVINFO easily with version
bump for real compatibility check.

This fixes that to check minimal required PVINFO version instead
and currently minimal 1.0 is required.

Cc: Chuanxiao Dong <chuanxiao.dong@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: stable@vger.kernel.org # 4.10+
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_pvinfo.h | 3 ++-
 drivers/gpu/drm/i915/i915_vgpu.c   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_pvinfo.h b/drivers/gpu/drm/i915/i915_pvinfo.h
index c0cb2974caac..96434707857e 100644
--- a/drivers/gpu/drm/i915/i915_pvinfo.h
+++ b/drivers/gpu/drm/i915/i915_pvinfo.h
@@ -37,7 +37,8 @@
 #define VGT_VERSION_MINOR 0
 
 #define INTEL_VGT_IF_VERSION_ENCODE(major, minor) ((major) << 16 | (minor))
-#define INTEL_VGT_IF_VERSION \
+/* minimal required PVINFO version */
+#define INTEL_VGT_IF_VERSION_REQUIRED \
 	INTEL_VGT_IF_VERSION_ENCODE(VGT_VERSION_MAJOR, VGT_VERSION_MINOR)
 
 /*
diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
index 4ab8a973b61f..5798572e6db3 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.c
+++ b/drivers/gpu/drm/i915/i915_vgpu.c
@@ -72,7 +72,7 @@ void i915_check_vgpu(struct drm_i915_private *dev_priv)
 	version = INTEL_VGT_IF_VERSION_ENCODE(
 		__raw_i915_read16(dev_priv, vgtif_reg(version_major)),
 		__raw_i915_read16(dev_priv, vgtif_reg(version_minor)));
-	if (version != INTEL_VGT_IF_VERSION) {
+	if (version < INTEL_VGT_IF_VERSION_REQUIRED) {
 		DRM_INFO("VGT interface version mismatch!\n");
 		return;
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-06-12 12:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05  3:00 [PATCH] drm/i915: Fix GVT-g PVINFO version compatibility check Zhenyu Wang
2017-06-05  3:25 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-06-05 13:40 ` [PATCH] " Joonas Lahtinen
2017-06-07  9:16   ` Zhenyu Wang
2017-06-08  6:58 ` [PATCH v2] " Zhenyu Wang
2017-06-08  9:17   ` Joonas Lahtinen
2017-06-09  7:48   ` [PATCH v3] " Zhenyu Wang
2017-06-08  7:27 ` ✓ Fi.CI.BAT: success for drm/i915: Fix GVT-g PVINFO version compatibility check (rev2) Patchwork
2017-06-09  8:10 ` ✓ Fi.CI.BAT: success for drm/i915: Fix GVT-g PVINFO version compatibility check (rev3) Patchwork
2017-06-12 12:46   ` Joonas Lahtinen

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.