drm/amdgpu: fix vbios reservation handling on SR-IOV
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Dec 2020 16:36:28 +0000 (11:36 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Dec 2020 21:43:48 +0000 (16:43 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

index c2ced5be6d7bf87115c6628808cbe6778d2a426d..6e679db5e46f0e8ceb1b5b26d6d88c3fb48f673d 100644 (file)
@@ -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);