drm/i915: more virtual south bridge detection
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 26 Nov 2015 11:03:51 +0000 (12:03 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Nov 2015 14:20:41 +0000 (15:20 +0100)
Commit "30c964a drm/i915: Detect virtual south bridge" detects and
handles the southbridge emulated by vmware esx.  Add the ich9 south
bridge emulated by 'qemu -M q35'.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h

index 649e20aaa3fffed7a46fdbf6cf2f4c4ff95cbee3..90faa8e03fca35ae1832183e34f496ce3b18c1da 100644 (file)
@@ -565,7 +565,8 @@ void intel_detect_pch(struct drm_device *dev)
                                DRM_DEBUG_KMS("Found SunrisePoint LP PCH\n");
                                WARN_ON(!IS_SKYLAKE(dev) &&
                                        !IS_KABYLAKE(dev));
-                       } else if (id == INTEL_PCH_P2X_DEVICE_ID_TYPE) {
+                       } else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
+                                  (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE)) {
                                dev_priv->pch_type = intel_virt_detect_pch(dev);
                        } else
                                continue;
index 3d8741eff7d3435fb0604e0140e32dc8b3b235e9..439226d3943779b12608173e2ac8306913dc40ce 100644 (file)
@@ -2609,6 +2609,7 @@ struct drm_i915_cmd_table {
 #define INTEL_PCH_SPT_DEVICE_ID_TYPE           0xA100
 #define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE                0x9D00
 #define INTEL_PCH_P2X_DEVICE_ID_TYPE           0x7100
+#define INTEL_PCH_QEMU_DEVICE_ID_TYPE          0x2900 /* qemu q35 has 2918 */
 
 #define INTEL_PCH_TYPE(dev) (__I915__(dev)->pch_type)
 #define HAS_PCH_SPT(dev) (INTEL_PCH_TYPE(dev) == PCH_SPT)