In SRIOV case, the autoload sequence is the same
as bare metal, except VF won't load TOC.
Signed-off-by: Jiange Zhao <Jiange.Zhao@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
 
        /* For ASICs support RLC autoload, psp will parse the toc
         * and calculate the total size of TMR needed */
-       if (psp->toc_start_addr &&
+       if (!amdgpu_sriov_vf(psp->adev) &&
+           psp->toc_start_addr &&
            psp->toc_bin_size &&
            psp->fw_pri_buf) {
                ret = psp_load_toc(psp, &tmr_size);
        int ret;
        struct psp_gfx_cmd_resp *cmd;
 
-       if (amdgpu_sriov_vf(psp->adev))
-               return 0;
-
        cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);
        if (!cmd)
                return -ENOMEM;