]> Git Repo - J-linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
[J-linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_virt.c
index 894444ab00322a7b22b3d1ca1b09ae2acec394dc..07bc0f5047130fc7861f5aa90664cad080674356 100644 (file)
@@ -625,20 +625,20 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)
        adev->virt.fw_reserve.p_vf2pf = NULL;
        adev->virt.vf2pf_update_interval_ms = 0;
 
-       if (adev->bios != NULL) {
-               adev->virt.vf2pf_update_interval_ms = 2000;
+       if (adev->mman.fw_vram_usage_va != NULL) {
+               /* go through this logic in ip_init and reset to init workqueue*/
+               amdgpu_virt_exchange_data(adev);
 
+               INIT_DELAYED_WORK(&adev->virt.vf2pf_work, amdgpu_virt_update_vf2pf_work_item);
+               schedule_delayed_work(&(adev->virt.vf2pf_work), msecs_to_jiffies(adev->virt.vf2pf_update_interval_ms));
+       } else if (adev->bios != NULL) {
+               /* got through this logic in early init stage to get necessary flags, e.g. rlcg_acc related*/
                adev->virt.fw_reserve.p_pf2vf =
                        (struct amd_sriov_msg_pf2vf_info_header *)
                        (adev->bios + (AMD_SRIOV_MSG_PF2VF_OFFSET_KB << 10));
 
                amdgpu_virt_read_pf2vf_data(adev);
        }
-
-       if (adev->virt.vf2pf_update_interval_ms != 0) {
-               INIT_DELAYED_WORK(&adev->virt.vf2pf_work, amdgpu_virt_update_vf2pf_work_item);
-               schedule_delayed_work(&(adev->virt.vf2pf_work), msecs_to_jiffies(adev->virt.vf2pf_update_interval_ms));
-       }
 }
 
 
@@ -674,12 +674,6 @@ void amdgpu_virt_exchange_data(struct amdgpu_device *adev)
                                if (adev->virt.ras_init_done)
                                        amdgpu_virt_add_bad_page(adev, bp_block_offset, bp_block_size);
                        }
-       } else if (adev->bios != NULL) {
-               adev->virt.fw_reserve.p_pf2vf =
-                       (struct amd_sriov_msg_pf2vf_info_header *)
-                       (adev->bios + (AMD_SRIOV_MSG_PF2VF_OFFSET_KB << 10));
-
-               amdgpu_virt_read_pf2vf_data(adev);
        }
 }
 
This page took 0.031172 seconds and 4 git commands to generate.