Skip to contentSkip to conversation

drm/i915: refine qemu south bridge detection

PATCH In review Gerd Hoffmann 3 participants 7 messages Jan 25, 2016 – Jan 29, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/i915: refine qemu south bridge detection

The test for the qemu q35 south bridge added by commit "39bfcd52 drm/i915: more virtual south bridge detection" also matches on real hardware. Having the check for virtual systems last in the list is not enough to avoid that ...

Refine the check by additionally verifying the pci subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

---
 drivers/gpu/drm/i915/i915_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +3 -1
index 3ac616d..f357058 100644
@@ -501,7 +501,9 @@ void intel_detect_pch(struct drm_device *dev)
 				WARN_ON(!IS_SKYLAKE(dev) &&
 					!IS_KABYLAKE(dev));
 			} else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
-				   (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE)) {
+				   ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
+				    pch->subsystem_vendor == 0x1af4 &&
+				    pch->subsystem_device == 0x1100)) {
 				dev_priv->pch_type = intel_virt_detect_pch(dev);
 			} else
 				continue;
Signature · 6 lines
1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
In reply to Gerd Hoffmann
Quoted 10 lines · Gerd Hoffmann

The test for the qemu q35 south bridge added by commit "39bfcd52 drm/i915: more virtual south bridge detection" also matches on real hardware. Having the check for virtual systems last in the list is not enough to avoid that ...

Refine the check by additionally verifying the pci subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

I haven't seen this patch (or a revert of 39bfcd52) show up in the intel drm repos yet. Has anyone asked for this tpo be included? Is there some problem with the patch? (It works for me.)
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#3 lore raw
Quoted 8 lines · Bruno Wolff III
Quoted 6 lines · Gerd Hoffmann

The test for the qemu q35 south bridge added by commit "39bfcd52 drm/i915: more virtual south bridge detection" also matches on real hardware. Having the check for virtual systems last in the list is not enough to avoid that ...

Quoted 8 lines
Quoted 4 lines

Refine the check by additionally verifying the pci subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

I haven't seen this patch (or a revert of 39bfcd52) show up in the intel drm repos yet. Has anyone asked for this tpo be included? Is there some problem with the patch? (It works for me.)

Pushed to drm-intel-next-queued, thanks for the patch and testing.

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#4 lore raw
In reply to Gerd Hoffmann
Quoted 10 lines · Gerd Hoffmann

The test for the qemu q35 south bridge added by commit "39bfcd52 drm/i915: more virtual south bridge detection" also matches on real hardware. Having the check for virtual systems last in the list is not enough to avoid that ...

Refine the check by additionally verifying the pci subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

Incidentally, I just spotted [1]. Gerd, could you review that one please, and (once it gets merged) post a follow-up changing our magic numbers to those constants as well?

Thanks,
Jani.

[1] http://mid.gmane.org/[email protected]

Quoted 22 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +3 -1
index 3ac616d..f357058 100644
@@ -501,7 +501,9 @@ void intel_detect_pch(struct drm_device *dev)
 				WARN_ON(!IS_SKYLAKE(dev) &&
 					!IS_KABYLAKE(dev));
 			} else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
-				   (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE)) {
+				   ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
+				    pch->subsystem_vendor == 0x1af4 &&
+				    pch->subsystem_device == 0x1100)) {
 				dev_priv->pch_type = intel_virt_detect_pch(dev);
 			} else
 				continue;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw
Quoted 7 lines · Jani Nikula
Quoted 6 lines · Gerd Hoffmann

The test for the qemu q35 south bridge added by commit "39bfcd52 drm/i915: more virtual south bridge detection" also matches on real hardware. Having the check for virtual systems last in the list is not enough to avoid that ...

Quoted 7 lines
Quoted 4 lines

Refine the check by additionally verifying the pci subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

Incidentally, I just spotted [1]. Gerd, could you review that one please,

Done.

Quoted 2 lines

and (once it gets merged) post a follow-up changing our magic numbers to those constants as well?

Sure.

cheers,
Gerd

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#6 lore raw
Quoted 16 lines · Gerd Hoffmann
Quoted 7 lines · Jani Nikula
Quoted 6 lines · Gerd Hoffmann

The test for the qemu q35 south bridge added by commit "39bfcd52 drm/i915: more virtual south bridge detection" also matches on real hardware. Having the check for virtual systems last in the list is not enough to avoid that ...

Quoted 7 lines
Quoted 4 lines

Refine the check by additionally verifying the pci subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

Incidentally, I just spotted [1]. Gerd, could you review that one please,

Quoted 6 lines

Done.

Quoted 2 lines

and (once it gets merged) post a follow-up changing our magic numbers to those constants as well?

Sure.

Many thanks,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel