diff options
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0572-drm-amdgpu-check-before-checking-pci-bridge-register.patch')
-rw-r--r-- | meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0572-drm-amdgpu-check-before-checking-pci-bridge-register.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0572-drm-amdgpu-check-before-checking-pci-bridge-register.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0572-drm-amdgpu-check-before-checking-pci-bridge-register.patch new file mode 100644 index 00000000..85ae5a37 --- /dev/null +++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0572-drm-amdgpu-check-before-checking-pci-bridge-register.patch @@ -0,0 +1,53 @@ +From e79d5c0870eedce94e5f5a2ffab30511e48fa144 Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Tue, 6 Oct 2015 09:38:45 -0400 +Subject: [PATCH 0572/1050] drm/amdgpu: check before checking pci bridge + registers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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 | 3 +++ + drivers/gpu/drm/amd/amdgpu/vi.c | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c +index 4b6ce74..484710c 100644 +--- a/drivers/gpu/drm/amd/amdgpu/cik.c ++++ b/drivers/gpu/drm/amd/amdgpu/cik.c +@@ -1567,6 +1567,9 @@ static void cik_pcie_gen3_enable(struct amdgpu_device *adev) + int ret, i; + u16 tmp16; + ++ if (pci_is_root_bus(adev->pdev->bus)) ++ return; ++ + if (amdgpu_pcie_gen2 == 0) + return; + +diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c +index b55ceb1..0bac870 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; + +-- +1.9.1 + |