diff options
author | Xiangliang Yu <Xiangliang.Yu@amd.com> | 2017-01-08 22:53:14 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-01-27 11:13:05 -0500 |
commit | c8394f38fa2362385fd34f7034a2276b458c640e (patch) | |
tree | 4db252af5784403a7619a28e96f91da2a700ad72 /drivers/gpu/drm/amd | |
parent | 91caa081378c612030bfa9762fd7d88036508238 (diff) |
drm/amdgpu: remove detect_hw_virtualization interface
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>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si.c | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index b573ed31e47d..842e1d300745 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -1190,7 +1190,6 @@ struct amdgpu_asic_funcs { | |||
1190 | bool (*read_disabled_bios)(struct amdgpu_device *adev); | 1190 | bool (*read_disabled_bios)(struct amdgpu_device *adev); |
1191 | bool (*read_bios_from_rom)(struct amdgpu_device *adev, | 1191 | bool (*read_bios_from_rom)(struct amdgpu_device *adev, |
1192 | u8 *bios, u32 length_bytes); | 1192 | u8 *bios, u32 length_bytes); |
1193 | void (*detect_hw_virtualization) (struct amdgpu_device *adev); | ||
1194 | int (*read_register)(struct amdgpu_device *adev, u32 se_num, | 1193 | int (*read_register)(struct amdgpu_device *adev, u32 se_num, |
1195 | u32 sh_num, u32 reg_offset, u32 *value); | 1194 | u32 sh_num, u32 reg_offset, u32 *value); |
1196 | void (*set_vga_state)(struct amdgpu_device *adev, bool state); | 1195 | void (*set_vga_state)(struct amdgpu_device *adev, bool state); |
@@ -1616,7 +1615,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
1616 | #define amdgpu_asic_get_gpu_clock_counter(adev) (adev)->asic_funcs->get_gpu_clock_counter((adev)) | 1615 | #define amdgpu_asic_get_gpu_clock_counter(adev) (adev)->asic_funcs->get_gpu_clock_counter((adev)) |
1617 | #define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev)) | 1616 | #define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev)) |
1618 | #define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l)) | 1617 | #define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l)) |
1619 | #define amdgpu_asic_detect_hw_virtualization(adev) (adev)->asic_funcs->detect_hw_virtualization((adev)) | ||
1620 | #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v))) | 1618 | #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v))) |
1621 | #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid)) | 1619 | #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid)) |
1622 | #define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags)) | 1620 | #define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags)) |
diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c index 84d5affce56b..7da688b0d27d 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik.c +++ b/drivers/gpu/drm/amd/amdgpu/cik.c | |||
@@ -1634,7 +1634,6 @@ static const struct amdgpu_asic_funcs cik_asic_funcs = | |||
1634 | { | 1634 | { |
1635 | .read_disabled_bios = &cik_read_disabled_bios, | 1635 | .read_disabled_bios = &cik_read_disabled_bios, |
1636 | .read_bios_from_rom = &cik_read_bios_from_rom, | 1636 | .read_bios_from_rom = &cik_read_bios_from_rom, |
1637 | .detect_hw_virtualization = cik_detect_hw_virtualization, | ||
1638 | .read_register = &cik_read_register, | 1637 | .read_register = &cik_read_register, |
1639 | .reset = &cik_asic_reset, | 1638 | .reset = &cik_asic_reset, |
1640 | .set_vga_state = &cik_vga_set_state, | 1639 | .set_vga_state = &cik_vga_set_state, |
@@ -1890,6 +1889,8 @@ static const struct amdgpu_ip_block_version cik_common_ip_block = | |||
1890 | 1889 | ||
1891 | int cik_set_ip_blocks(struct amdgpu_device *adev) | 1890 | int cik_set_ip_blocks(struct amdgpu_device *adev) |
1892 | { | 1891 | { |
1892 | cik_detect_hw_virtualization(adev); | ||
1893 | |||
1893 | switch (adev->asic_type) { | 1894 | switch (adev->asic_type) { |
1894 | case CHIP_BONAIRE: | 1895 | case CHIP_BONAIRE: |
1895 | amdgpu_ip_block_add(adev, &cik_common_ip_block); | 1896 | amdgpu_ip_block_add(adev, &cik_common_ip_block); |
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index 6a85daa63d21..413a516dfeb7 100644 --- a/drivers/gpu/drm/amd/amdgpu/si.c +++ b/drivers/gpu/drm/amd/amdgpu/si.c | |||
@@ -1144,7 +1144,6 @@ static void si_detect_hw_virtualization(struct amdgpu_device *adev) | |||
1144 | static const struct amdgpu_asic_funcs si_asic_funcs = | 1144 | static const struct amdgpu_asic_funcs si_asic_funcs = |
1145 | { | 1145 | { |
1146 | .read_disabled_bios = &si_read_disabled_bios, | 1146 | .read_disabled_bios = &si_read_disabled_bios, |
1147 | .detect_hw_virtualization = si_detect_hw_virtualization, | ||
1148 | .read_register = &si_read_register, | 1147 | .read_register = &si_read_register, |
1149 | .reset = &si_asic_reset, | 1148 | .reset = &si_asic_reset, |
1150 | .set_vga_state = &si_vga_set_state, | 1149 | .set_vga_state = &si_vga_set_state, |
@@ -1861,6 +1860,8 @@ static const struct amdgpu_ip_block_version si_common_ip_block = | |||
1861 | 1860 | ||
1862 | int si_set_ip_blocks(struct amdgpu_device *adev) | 1861 | int si_set_ip_blocks(struct amdgpu_device *adev) |
1863 | { | 1862 | { |
1863 | si_detect_hw_virtualization(adev); | ||
1864 | |||
1864 | switch (adev->asic_type) { | 1865 | switch (adev->asic_type) { |
1865 | case CHIP_VERDE: | 1866 | case CHIP_VERDE: |
1866 | case CHIP_TAHITI: | 1867 | case CHIP_TAHITI: |