<div dir="ltr">Hello!<div><br></div><div>I have 2 machines with Comet Lake CPUs on Tiger Lake PCH (500 series of Intel chipsets).</div><div>For that configuration there was a patch for adding support for Tiger Lake PCH with CometLake CPU in 2021 - <a href="https://patchwork.freedesktop.org/patch/412664/">https://patchwork.freedesktop.org/patch/412664/</a></div><div>This patch made possible correct detection of such chipset and cpu configuration for i915 kernel module. Without it there was no output to any display (HDMI/DP/DVI, even VGA). </div><div><br></div><div>But this patch doesn't touch intel_virt_detect_pch method, when you passthrough iGPU to a virtual machine. </div><div>So, virtual PCH incorrectly detects as Cannon Lake and you have no output to a physical display with i915 driver: </div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>[    2.933139] i915 0000:00:02.0: [drm:intel_virt_detect_pch [i915]] Assuming PCH ID a300</div></div><div><div>[    2.933308] i915 0000:00:02.0: [drm:intel_pch_type [i915]] Found Cannon Lake PCH (CNP)</div></div></blockquote><div><div><br></div><div>The bug is on line 173 in drivers/gpu/drm/i915/soc/intel_pch.c in method intel_virt_detect_pch:</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>else if (IS_TIGERLAKE(dev_priv) || IS_ROCKETLAKE(dev_priv))</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>            id = INTEL_PCH_TGP_DEVICE_ID_TYPE;</div></div></blockquote></blockquote><div><div>It must be:</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>else if (IS_TIGERLAKE(dev_priv) || IS_ROCKETLAKE(dev_priv) || IS_GEN9_BC(dev_priv))</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>id = INTEL_PCH_TGP_DEVICE_ID_TYPE;</div></div></blockquote></blockquote><div><div><br></div><div>After that small change you get correct detection of PCH and have output to a physical display in VM with passthrough iGPU:</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>[   16.139809] i915 0000:00:02.0: [drm:intel_virt_detect_pch [i915]] Assuming PCH ID a080</div></div><div><div>[   16.261151] i915 0000:00:02.0: [drm:intel_pch_type [i915]] Found Tiger Lake LP PCH</div></div></blockquote><div><div><br></div><div>All kernel versions in any distro since 2021 are affected by this small bug.</div><div>The patch for i915 module of the actual kernel version is in attachment. </div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Best regards, Andrey Toloknev</div></div></div>