It's not asic specific.

Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++--
 drivers/gpu/drm/amd/amdgpu/vi.c            | 7 -------
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index ff6e683..f3d4bf6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1828,7 +1828,6 @@ struct amdgpu_asic_funcs {
        bool (*read_bios_from_rom)(struct amdgpu_device *adev,
                                   u8 *bios, u32 length_bytes);
        void (*detect_hw_virtualization) (struct amdgpu_device *adev);
-       void (*detect_sriov_bios)(struct amdgpu_device *adev);
        int (*read_register)(struct amdgpu_device *adev, u32 se_num,
                             u32 sh_num, u32 reg_offset, u32 *value);
        void (*set_vga_state)(struct amdgpu_device *adev, bool state);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ca161e9..76f8298 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1535,6 +1535,12 @@ static bool amdgpu_device_is_virtual(void)
 #endif
 }
 
+static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
+{
+       if (amdgpu_atombios_has_gpu_virtualization_table(adev))
+               adev->virtualization.virtual_caps |= 
AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+}
+
 /**
  * amdgpu_device_init - initialize the driver
  *
@@ -1690,8 +1696,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
        }
 
        /* detect if we are with an SRIOV vbios */
-       if (adev->asic_funcs->detect_sriov_bios)
-               amdgpu_asic_detect_sriov_bios(adev);
+       amdgpu_device_detect_sriov_bios(adev);
 
        /* Post card if necessary */
        if (amdgpu_vpost_needed(adev)) {
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 81780f1..a8154d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -462,12 +462,6 @@ static void vi_detect_hw_virtualization(struct 
amdgpu_device *adev)
        }
 }
 
-static void vi_detect_sriov_bios(struct amdgpu_device *adev)
-{
-       if (amdgpu_atombios_has_gpu_virtualization_table(adev))
-               adev->virtualization.virtual_caps |= 
AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
-}
-
 static const struct amdgpu_allowed_register_entry 
tonga_allowed_read_registers[] = {
        {mmGB_MACROTILE_MODE7, true},
 };
@@ -1531,7 +1525,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,
-       .detect_sriov_bios = vi_detect_sriov_bios,
        .read_register = &vi_read_register,
        .reset = &vi_asic_reset,
        .set_vga_state = &vi_vga_set_state,
-- 
2.5.5

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

Reply via email to