From: pding Date: Tue, 7 Nov 2017 03:02:00 +0000 (+0800) Subject: drm/amdgpu: bypass FB resizing for SRIOV VF X-Git-Tag: v4.19~1610^2~33^2~206 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c03b912d7f84636766bc26d38df5b21f1c00e94;p=platform%2Fkernel%2Flinux-rpi3.git drm/amdgpu: bypass FB resizing for SRIOV VF 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 Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index ddb50c4..05087ed 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -768,6 +768,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,