Page MenuHomeFreeBSD

linuxkpi: Fix `pci_upstream_bridge()` with DRM devices
Needs ReviewPublic

Authored by dumbbell on Sat, Mar 15, 11:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 17, 2:44 AM
Unknown Object (File)
Sun, Mar 16, 7:15 PM
Unknown Object (File)
Sun, Mar 16, 7:09 PM
Unknown Object (File)
Sun, Mar 16, 12:44 PM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

In the case of DRM drivers, the passed device is a child of vgapci and has a devclass of drmn. We want to start the lookup from vgapci, so the parent of the passed drmn.

This fixes an infinite loop with the amdgpu DRM driver that started to use this function in Linux 6.8: pci_upstream_bridge() was returning itself and the code in amdgpu was calling it again, hoping to get a device with a vendor that is not "ATI".

This is part of the update of DRM drivers to Linux 6.8.

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped