Change place of virt_init_setting function so that can cover the
cg and pg flags configuration.

Signed-off-by: Xiangliang Yu <xiangliang...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 10 +++++-----
 drivers/gpu/drm/amd/amdgpu/vi.c    | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c 
b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 2c05dab..6999ac3 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -538,11 +538,6 @@ static int soc15_common_early_init(void *handle)
                (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_PSP)))
                psp_enabled = true;
 
-       if (amdgpu_sriov_vf(adev)) {
-               amdgpu_virt_init_setting(adev);
-               xgpu_ai_mailbox_set_irq_funcs(adev);
-       }
-
        /*
         * nbio need be used for both sdma and gfx9, but only
         * initializes once
@@ -586,6 +581,11 @@ static int soc15_common_early_init(void *handle)
                return -EINVAL;
        }
 
+       if (amdgpu_sriov_vf(adev)) {
+               amdgpu_virt_init_setting(adev);
+               xgpu_ai_mailbox_set_irq_funcs(adev);
+       }
+
        adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, 
amdgpu_fw_load_type);
 
        amdgpu_get_pcie_info(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 505c17a..48fb373 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -895,11 +895,6 @@ static int vi_common_early_init(void *handle)
                (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_SMC)))
                smc_enabled = true;
 
-       if (amdgpu_sriov_vf(adev)) {
-               amdgpu_virt_init_setting(adev);
-               xgpu_vi_mailbox_set_irq_funcs(adev);
-       }
-
        adev->rev_id = vi_get_rev_id(adev);
        adev->external_rev_id = 0xFF;
        switch (adev->asic_type) {
@@ -1072,6 +1067,11 @@ static int vi_common_early_init(void *handle)
                return -EINVAL;
        }
 
+       if (amdgpu_sriov_vf(adev)) {
+               amdgpu_virt_init_setting(adev);
+               xgpu_vi_mailbox_set_irq_funcs(adev);
+       }
+
        /* vi use smc load by default */
        adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, 
amdgpu_fw_load_type);
 
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to