答复: [PATCH 1/2] drm/amdgpu/vi: move virtualization detection forward

Liu, Monk Monk.Liu at amd.com
Mon Jan 9 03:29:56 UTC 2017


Hi Xiangliang


please change as below accordingly:

1, call "vi_detect_hw_virtualization" in vi_set_ip_blocks directly

2, drop below changes:

+       if (amdgpu_sriov_vf(adev)) {
+               amdgpu_ip_block_add(adev, &vi_common_ip_block);
+               amdgpu_ip_block_add(adev, &gmc_v8_5_ip_block);
+               amdgpu_ip_block_add(adev, &tonga_ih_ip_block);
+               amdgpu_ip_block_add(adev, &amdgpu_pp_ip_block);
+               amdgpu_ip_block_add(adev, &dce_virtual_ip_block);
+               amdgpu_ip_block_add(adev, &gfx_v8_0_ip_block);
+               amdgpu_ip_block_add(adev, &sdma_v3_0_ip_block);
+       }


since some ip  version is different between VI (e.g. FIJI use gmc_v8_5 and tonga use v8_0, so your change at last increase more lines, we'll finally support TONGA/FIJI/Ellesmere for SRIOV)


BR Monk

________________________________
发件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Xiangliang Yu <Xiangliang.Yu at amd.com>
发送时间: 2017年1月8日 11:12:35
收件人: amd-gfx at lists.freedesktop.org
抄送: Yu, Xiangliang
主题: [PATCH 1/2] drm/amdgpu/vi: move virtualization detection forward

Move the detection forward into vi_set_ip_blocks function, then
add ip blocks virtualization need if device is VF.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index b2ce7da..580b392 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -857,7 +857,6 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =
 {
         .read_disabled_bios = &vi_read_disabled_bios,
         .read_bios_from_rom = &vi_read_bios_from_rom,
-       .detect_hw_virtualization = vi_detect_hw_virtualization,
         .read_register = &vi_read_register,
         .reset = &vi_asic_reset,
         .set_vga_state = &vi_vga_set_state,
@@ -1049,10 +1048,6 @@ static int vi_common_early_init(void *handle)
                 return -EINVAL;
         }

-       /* in early init stage, vbios code won't work */
-       if (adev->asic_funcs->detect_hw_virtualization)
-               amdgpu_asic_detect_hw_virtualization(adev);
-
         if (amdgpu_smc_load_fw && smc_enabled)
                 adev->firmware.smu_load = true;

@@ -1403,6 +1398,18 @@ static const struct amdgpu_ip_block_version vi_common_ip_block =

 int vi_set_ip_blocks(struct amdgpu_device *adev)
 {
+       /* in early init stage, vbios code won't work */
+       vi_detect_hw_virtualization(adev);
+       if (amdgpu_sriov_vf(adev)) {
+               amdgpu_ip_block_add(adev, &vi_common_ip_block);
+               amdgpu_ip_block_add(adev, &gmc_v8_5_ip_block);
+               amdgpu_ip_block_add(adev, &tonga_ih_ip_block);
+               amdgpu_ip_block_add(adev, &amdgpu_pp_ip_block);
+               amdgpu_ip_block_add(adev, &dce_virtual_ip_block);
+               amdgpu_ip_block_add(adev, &gfx_v8_0_ip_block);
+               amdgpu_ip_block_add(adev, &sdma_v3_0_ip_block);
+       }
+
         switch (adev->asic_type) {
         case CHIP_TOPAZ:
                 /* topaz has no DCE, UVD, VCE */
--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170109/746753bf/attachment.html>


More information about the amd-gfx mailing list