]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
radeon: Test for PCI root bus before assuming bus->self
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 27 Aug 2014 19:01:35 +0000 (13:01 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Aug 2014 21:54:50 +0000 (17:54 -0400)
commit0bd252de78d406485c896508c13a8f7a78ee8353
treeaa2899f955d4b69ad9fedfd349bf12daef9fabdc
parent0a5f6e9d60e71e4b6dbeabd97bc887d6b2b0f0c8
radeon: Test for PCI root bus before assuming bus->self

If we assign a Radeon device to a virtual machine, we can no longer
assume a fixed hardware topology, like the GPU having a parent device.
This patch simply adds a few pci_is_root_bus() tests to avoid passing
a NULL pointer to PCI access functions, allowing the radeon driver to
work in a QEMU 440FX machine with an assigned HD8570 on the emulated
PCI root bus.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/si.c