diff options
| author | 2015-10-06 09:38:45 -0400 | |
|---|---|---|
| committer | 2015-10-06 10:43:16 -0400 | |
| commit | e79d5c0870eedce94e5f5a2ffab30511e48fa144 (patch) | |
| tree | 937fd1b2d17130f8b9e0e5b8cf793b1d0d317c2e /drivers/gpu/drm/amd/amdgpu/vi.c | |
| parent | drm/amdgpu: fix num_crtc on CZ (diff) | |
| download | wireguard-linux-e79d5c0870eedce94e5f5a2ffab30511e48fa144.tar.xz wireguard-linux-e79d5c0870eedce94e5f5a2ffab30511e48fa144.zip | |
drm/amdgpu: check before checking pci bridge registers
Make sure we are not the root device before attempting to
read the pcie bridge registers to check the pcie gen speeed.
Fixes a crash when the device is passed through to a VM.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vi.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index b55ceb14fdcd..0bac8702e934 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -1005,6 +1005,9 @@ static void vi_pcie_gen3_enable(struct amdgpu_device *adev) u32 mask; int ret; + if (pci_is_root_bus(adev->pdev->bus)) + return; + if (amdgpu_pcie_gen2 == 0) return; |
