diff options
author | pding <[email protected]> | 2017-11-07 11:02:00 +0800 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2017-12-04 16:41:45 -0500 |
commit | 0c03b912d7f84636766bc26d38df5b21f1c00e94 (patch) | |
tree | 6035c7509dcd2ae31ed8015f24678dca70249999 | |
parent | c6332b97fa77bafba2e4c68050090c08c21bff35 (diff) |
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 <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index ddb50c48cb06..05087eda0b71 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, |