drm/amdgpu: remove detect_hw_virtualization interface
authorXiangliang Yu <Xiangliang.Yu@amd.com>
Mon, 9 Jan 2017 03:53:14 +0000 (11:53 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 16:13:05 +0000 (11:13 -0500)
Call detection function driectly, so remove the interface.

V2: ci and si also need to call the detect function.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/cik.c
drivers/gpu/drm/amd/amdgpu/si.c

index b573ed31e47dc58d76549771b9e9c660cdc1fcc1..842e1d30074564163d82a7def727a793be320ea6 100644 (file)
@@ -1190,7 +1190,6 @@ struct amdgpu_asic_funcs {
        bool (*read_disabled_bios)(struct amdgpu_device *adev);
        bool (*read_bios_from_rom)(struct amdgpu_device *adev,
                                   u8 *bios, u32 length_bytes);
-       void (*detect_hw_virtualization) (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);
@@ -1616,7 +1615,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
 #define amdgpu_asic_get_gpu_clock_counter(adev) (adev)->asic_funcs->get_gpu_clock_counter((adev))
 #define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev))
 #define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l))
-#define amdgpu_asic_detect_hw_virtualization(adev) (adev)->asic_funcs->detect_hw_virtualization((adev))
 #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v)))
 #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid))
 #define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags))
index 84d5affce56bcc41441969b00fa1148316b03892..7da688b0d27df5d871674d8132ad11929833eacd 100644 (file)
@@ -1634,7 +1634,6 @@ static const struct amdgpu_asic_funcs cik_asic_funcs =
 {
        .read_disabled_bios = &cik_read_disabled_bios,
        .read_bios_from_rom = &cik_read_bios_from_rom,
-       .detect_hw_virtualization = cik_detect_hw_virtualization,
        .read_register = &cik_read_register,
        .reset = &cik_asic_reset,
        .set_vga_state = &cik_vga_set_state,
@@ -1890,6 +1889,8 @@ static const struct amdgpu_ip_block_version cik_common_ip_block =
 
 int cik_set_ip_blocks(struct amdgpu_device *adev)
 {
+       cik_detect_hw_virtualization(adev);
+
        switch (adev->asic_type) {
        case CHIP_BONAIRE:
                amdgpu_ip_block_add(adev, &cik_common_ip_block);
index 6a85daa63d21076d62feb9e7276b5db6bb38c2fe..413a516dfeb72f48d1942157f59190ec72d73664 100644 (file)
@@ -1144,7 +1144,6 @@ static void si_detect_hw_virtualization(struct amdgpu_device *adev)
 static const struct amdgpu_asic_funcs si_asic_funcs =
 {
        .read_disabled_bios = &si_read_disabled_bios,
-       .detect_hw_virtualization = si_detect_hw_virtualization,
        .read_register = &si_read_register,
        .reset = &si_asic_reset,
        .set_vga_state = &si_vga_set_state,
@@ -1861,6 +1860,8 @@ static const struct amdgpu_ip_block_version si_common_ip_block =
 
 int si_set_ip_blocks(struct amdgpu_device *adev)
 {
+       si_detect_hw_virtualization(adev);
+
        switch (adev->asic_type) {
        case CHIP_VERDE:
        case CHIP_TAHITI: