diff options
author | Monk Liu <Monk.Liu@amd.com> | 2016-03-31 01:26:59 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-19 14:45:52 -0400 |
commit | 4e99a44e37bfed8c4f25c94687e8e4ac4ae65086 (patch) | |
tree | e8a95a6c2135115ca60ee8ca6bde7d33746b60d0 /drivers/gpu/drm/amd/amdgpu/si.c | |
parent | ecab76688a0785fbcddcd1ff638a3fc76db073aa (diff) |
drm/amdgpu:changes of virtualization cases probe (v3)
1,Changes on virtualization detections
2,Don't load smu & mc firmware if using sr-iov bios
3,skip vPost for sriov & force vPost if dev pass-through
v2: agd: squash in Rays's fix for the missed SI case
v3: agd: squash in additional fixes for CIK, SI, cleanup
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/si.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index fee76b8a536f..dc9511c5ecb8 100644 --- a/drivers/gpu/drm/amd/amdgpu/si.c +++ b/drivers/gpu/drm/amd/amdgpu/si.c | |||
@@ -952,12 +952,6 @@ static void si_smc_wreg(struct amdgpu_device *adev, u32 reg, u32 v) | |||
952 | spin_unlock_irqrestore(&adev->smc_idx_lock, flags); | 952 | spin_unlock_irqrestore(&adev->smc_idx_lock, flags); |
953 | } | 953 | } |
954 | 954 | ||
955 | static u32 si_get_virtual_caps(struct amdgpu_device *adev) | ||
956 | { | ||
957 | /* SI does not support SR-IOV */ | ||
958 | return 0; | ||
959 | } | ||
960 | |||
961 | static struct amdgpu_allowed_register_entry si_allowed_read_registers[] = { | 955 | static struct amdgpu_allowed_register_entry si_allowed_read_registers[] = { |
962 | {GRBM_STATUS, false}, | 956 | {GRBM_STATUS, false}, |
963 | {GB_ADDR_CONFIG, false}, | 957 | {GB_ADDR_CONFIG, false}, |
@@ -1124,16 +1118,22 @@ static int si_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk) | |||
1124 | return 0; | 1118 | return 0; |
1125 | } | 1119 | } |
1126 | 1120 | ||
1121 | static void si_detect_hw_virtualization(struct amdgpu_device *adev) | ||
1122 | { | ||
1123 | if (is_virtual_machine()) /* passthrough mode */ | ||
1124 | adev->virtualization.virtual_caps |= AMDGPU_PASSTHROUGH_MODE; | ||
1125 | } | ||
1126 | |||
1127 | static const struct amdgpu_asic_funcs si_asic_funcs = | 1127 | static const struct amdgpu_asic_funcs si_asic_funcs = |
1128 | { | 1128 | { |
1129 | .read_disabled_bios = &si_read_disabled_bios, | 1129 | .read_disabled_bios = &si_read_disabled_bios, |
1130 | .detect_hw_virtualization = si_detect_hw_virtualization, | ||
1130 | .read_register = &si_read_register, | 1131 | .read_register = &si_read_register, |
1131 | .reset = &si_asic_reset, | 1132 | .reset = &si_asic_reset, |
1132 | .set_vga_state = &si_vga_set_state, | 1133 | .set_vga_state = &si_vga_set_state, |
1133 | .get_xclk = &si_get_xclk, | 1134 | .get_xclk = &si_get_xclk, |
1134 | .set_uvd_clocks = &si_set_uvd_clocks, | 1135 | .set_uvd_clocks = &si_set_uvd_clocks, |
1135 | .set_vce_clocks = NULL, | 1136 | .set_vce_clocks = NULL, |
1136 | .get_virtual_caps = &si_get_virtual_caps, | ||
1137 | }; | 1137 | }; |
1138 | 1138 | ||
1139 | static uint32_t si_get_rev_id(struct amdgpu_device *adev) | 1139 | static uint32_t si_get_rev_id(struct amdgpu_device *adev) |