aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2936-drm-amdgpu-bypass-FB-resizing-for-SRIOV-VF.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2936-drm-amdgpu-bypass-FB-resizing-for-SRIOV-VF.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2936-drm-amdgpu-bypass-FB-resizing-for-SRIOV-VF.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2936-drm-amdgpu-bypass-FB-resizing-for-SRIOV-VF.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2936-drm-amdgpu-bypass-FB-resizing-for-SRIOV-VF.patch
new file mode 100644
index 00000000..4d8618bd
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2936-drm-amdgpu-bypass-FB-resizing-for-SRIOV-VF.patch
@@ -0,0 +1,37 @@
+From 0f18a09d4fd3b807f12c54e8e88b6b8092c40b1b Mon Sep 17 00:00:00 2001
+From: pding <Pixel.Ding@amd.com>
+Date: Tue, 7 Nov 2017 11:02:00 +0800
+Subject: [PATCH 2936/4131] drm/amdgpu: bypass FB resizing for SRIOV VF
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It introduces 900ms latency in exclusive mode which causes failure
+of driver loading. Host can resize the BAR before guest staring,
+so the resizing is not necessary here.
+
+Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index dc7c6e5..39dcc4e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -742,6 +742,10 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
+ u16 cmd;
+ int r;
+
++ /* Bypass for VF */
++ if (amdgpu_sriov_vf(adev))
++ return 0;
++
+ /* Disable memory decoding while we change the BAR addresses and size */
+ pci_read_config_word(adev->pdev, PCI_COMMAND, &cmd);
+ pci_write_config_word(adev->pdev, PCI_COMMAND,
+--
+2.7.4
+