]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
Merge tag 'v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_ucode.c
index a1891c93cdbf8780f110c5064ac2332c4b46467c..dfd1c98efa7c2116cf1fdb54c7d2a5443367023e 100644 (file)
@@ -382,10 +382,14 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
         * if SMU loaded firmware, it needn't add SMC, UVD, and VCE
         * ucode info here
         */
-       if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
-               adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 4;
-       else
+       if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
+               if (amdgpu_sriov_vf(adev))
+                       adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 3;
+               else
+                       adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 4;
+       } else {
                adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM;
+       }
 
        for (i = 0; i < adev->firmware.max_ucodes; i++) {
                ucode = &adev->firmware.ucode[i];
This page took 0.032587 seconds and 4 git commands to generate.