Linux 5.14 continues on from 5.13 renaming kernel structures, causing Parallels Tools build to fail. This patch seems to work in very limited testing. I do not know what this code does, use at your own risk.
--- prldrm.c.orig 2021-09-09 23:59:05.384654927 +0800
+++ prldrm.c 2021-09-10 00:18:56.872610562 +0800
@@ -1542,9 +1542,9 @@
{
DRM_DEBUG_DRIVER(PFX_FMT "pci:0000:%02x:%02x.%d",
PFX_ARG,
- dev->pdev->bus->number,
- PCI_SLOT(dev->pdev->devfn),
- PCI_FUNC(dev->pdev->devfn));
+ dev->dev->bus->number,
+ PCI_SLOT(dev->dev->devfn),
+ PCI_FUNC(dev->dev->devfn));
return drm_pci_set_busid(dev, master);
}
#endif
@@ -2582,7 +2582,7 @@
DRM_ERROR(PFX_FMT "Failed allocating a drm device.", PFX_ARG);
return PTR_ERR(dev);
}
- dev->pdev = pdev;
+ dev->dev = &pdev->dev;
prl_dev = kzalloc(sizeof(*prl_dev), GFP_KERNEL);
if (unlikely(!prl_dev)) {
--- prldrm.c.orig 2021-09-09 23:59:05.384654927 +0800
+++ prldrm.c 2021-09-10 00:18:56.872610562 +0800
@@ -1542,9 +1542,9 @@
{
DRM_DEBUG_DRIVER(PFX_FMT "pci:0000:%02x:%02x.%d",
PFX_ARG,
- dev->pdev->bus->number,
- PCI_SLOT(dev->pdev->devfn),
- PCI_FUNC(dev->pdev->devfn));
+ dev->dev->bus->number,
+ PCI_SLOT(dev->dev->devfn),
+ PCI_FUNC(dev->dev->devfn));
return drm_pci_set_busid(dev, master);
}
#endif
@@ -2582,7 +2582,7 @@
DRM_ERROR(PFX_FMT "Failed allocating a drm device.", PFX_ARG);
return PTR_ERR(dev);
}
- dev->pdev = pdev;
+ dev->dev = &pdev->dev;
prl_dev = kzalloc(sizeof(*prl_dev), GFP_KERNEL);
if (unlikely(!prl_dev)) {