]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: check before checking pci bridge registers
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Oct 2015 13:38:45 +0000 (09:38 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 00:53:42 +0000 (09:53 +0900)
commitb2e33f9e0ef4847f3d7c265f8adb478e7a74cb4c
tree8ff822c969fe2896bcfda20bca45af4e2d855cbd
parent421216eb5efd68d1c6bd3e4c969f71079bd9d0af
drm/amdgpu: check before checking pci bridge registers

commit e79d5c0870eedce94e5f5a2ffab30511e48fa144 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/cik.c
drivers/gpu/drm/amd/amdgpu/vi.c