summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2020-12-16 11:36:28 -0500
committerAlex Deucher <alexander.deucher@amd.com>2020-12-17 16:43:48 -0500
commit088fb29b40f2c78bfe01cebce1a1506b6f7e56d1 (patch)
tree2ce3d434f1425f1e3e259e07462ed95d627cd87d /drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
parent9e3a6ab74ff80128c337d5f95ce1867a452dc67e (diff)
downloadlinux-088fb29b40f2c78bfe01cebce1a1506b6f7e56d1.tar.gz
linux-088fb29b40f2c78bfe01cebce1a1506b6f7e56d1.tar.bz2
linux-088fb29b40f2c78bfe01cebce1a1506b6f7e56d1.zip
drm/amdgpu: fix vbios reservation handling on SR-IOV
There is no reserveration so set the size to 0. Fixes a regression on SR-IOV. Reviewed-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index c2ced5be6d7b..6e679db5e46f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -496,7 +496,8 @@ void amdgpu_gmc_get_vbios_allocations(struct amdgpu_device *adev)
break;
}
- if (!amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_DCE)) {
+ if (amdgpu_sriov_vf(adev) ||
+ !amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_DCE)) {
size = 0;
} else {
size = amdgpu_gmc_get_vbios_fb_size(adev);