Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Device wakeup capability is enabled unconditionally for all platforms and VFs, falsely advertising PME capability and breaking HPD polling on unsupported platforms. --
commit 3d9bcb78036d2ff7f08956912516e90ce3bea87a Author: Vinod Govindapillai <[email protected]> drm/xe/pm: initialize the device's system wakeup capabilities This commit enables the device as a wakeup device to allow display hotplugs to generate PME events for NVL+ hardware. > diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c > index 1e04e8ef2611f..009271ce532c6 100644 > --- a/drivers/gpu/drm/xe/xe_pci.c > +++ b/drivers/gpu/drm/xe/xe_pci.c > @@ -1216,6 +1216,10 @@ static int __xe_pci_probe(struct pci_dev *pdev, const > struct xe_device_desc *des > > pci_set_master(pdev); > > + err = devm_device_init_wakeup(&pdev->dev); > + if (err) > + return err; > + [Severity: High] Does enabling wakeup unconditionally here falsely advertise PME capabilities for unsupported platforms (e.g., DG2, MTL, LNL) and SR-IOV VFs? By calling devm_device_init_wakeup() in __xe_pci_probe(), the driver sets dev->power.can_wakeup = true for every xe device. Later, during xe_pci_runtime_suspend(), the code checks: pme_capable = pci_enable_wake(pdev, state, true) == 0; Because wakeup is enabled by default, pci_enable_wake() will incorrectly return 0 (success) on older PCIe platforms that report standard PCI PM capabilities. This erroneously sets pme_capable = true, which is passed to xe_display_set_pme_capable(). Since intel_hpd_poll_enable() skips polling if the device is marked PME capable, could this cause hotplug events to be completely missed during suspend on pre-NVL platforms that cannot actually generate PMEs from HPDs? > err = xe_probe_info_early(xe, desc, &probed_info); > if (err) > return err; -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
