drm/radeon: check if device is root before getting pci speed caps
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Jan 2019 17:05:16 +0000 (12:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 29 Jan 2019 15:57:02 +0000 (10:57 -0500)
commitafeff4c16edaa6275b903f82b0561406259aa3a3
tree562975a49a29fdcfa4756cb76f6465ae4b1cb826
parentdc14eb12f6bb3e779c5461429c1889a339c67aab
drm/radeon: check if device is root before getting pci speed caps

Check if the device is root rather before attempting to see what
speeds the pcie port supports.  Fixes a crash with pci passthrough
in a VM.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109366
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/ci_dpm.c
drivers/gpu/drm/radeon/si_dpm.c