]> git.baikalelectronics.ru Git - kernel.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)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Oct 2015 14:43:16 +0000 (10:43 -0400)
commitb14fb2694ca0c0a002e1d03fbde67d4e371f57f0
tree937fd1b2d17130f8b9e0e5b8cf793b1d0d317c2e
parentc4fd41e0da208646ed48de10df2d2178e850f24a
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
drivers/gpu/drm/amd/amdgpu/cik.c
drivers/gpu/drm/amd/amdgpu/vi.c