Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: wrap those atombios APIs used by SI under CONFIG_DRM_AMDGPU_SI

No need to compile them on CONFIG_DRM_AMDGPU_SI disabled.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Evan Quan and committed by
Alex Deucher
1a408c71 3712e7a4

+14 -10
+2
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
··· 1083 1083 return 0; 1084 1084 } 1085 1085 1086 + #ifdef CONFIG_DRM_AMDGPU_SI 1086 1087 int amdgpu_atombios_get_memory_pll_dividers(struct amdgpu_device *adev, 1087 1088 u32 clock, 1088 1089 bool strobe_mode, ··· 1504 1503 } 1505 1504 return -EINVAL; 1506 1505 } 1506 + #endif 1507 1507 1508 1508 bool amdgpu_atombios_has_gpu_virtualization_table(struct amdgpu_device *adev) 1509 1509 {
+12 -10
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h
··· 160 160 bool strobe_mode, 161 161 struct atom_clock_dividers *dividers); 162 162 163 + #ifdef CONFIG_DRM_AMDGPU_SI 163 164 int amdgpu_atombios_get_memory_pll_dividers(struct amdgpu_device *adev, 164 165 u32 clock, 165 166 bool strobe_mode, ··· 180 179 int amdgpu_atombios_init_mc_reg_table(struct amdgpu_device *adev, 181 180 u8 module_index, 182 181 struct atom_mc_reg_table *reg_table); 182 + int amdgpu_atombios_get_max_vddc(struct amdgpu_device *adev, u8 voltage_type, 183 + u16 voltage_id, u16 *voltage); 184 + int amdgpu_atombios_get_leakage_vddc_based_on_leakage_idx(struct amdgpu_device *adev, 185 + u16 *voltage, 186 + u16 leakage_idx); 187 + void amdgpu_atombios_get_default_voltages(struct amdgpu_device *adev, 188 + u16 *vddc, u16 *vddci, u16 *mvdd); 189 + int amdgpu_atombios_get_svi2_info(struct amdgpu_device *adev, 190 + u8 voltage_type, 191 + u8 *svd_gpio_id, u8 *svc_gpio_id); 192 + #endif 183 193 184 194 bool amdgpu_atombios_has_gpu_virtualization_table(struct amdgpu_device *adev); 185 195 ··· 202 190 bool amdgpu_atombios_scratch_need_asic_init(struct amdgpu_device *adev); 203 191 204 192 void amdgpu_atombios_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le); 205 - int amdgpu_atombios_get_max_vddc(struct amdgpu_device *adev, u8 voltage_type, 206 - u16 voltage_id, u16 *voltage); 207 - int amdgpu_atombios_get_leakage_vddc_based_on_leakage_idx(struct amdgpu_device *adev, 208 - u16 *voltage, 209 - u16 leakage_idx); 210 - void amdgpu_atombios_get_default_voltages(struct amdgpu_device *adev, 211 - u16 *vddc, u16 *vddci, u16 *mvdd); 212 193 int amdgpu_atombios_get_clock_dividers(struct amdgpu_device *adev, 213 194 u8 clock_type, 214 195 u32 clock, 215 196 bool strobe_mode, 216 197 struct atom_clock_dividers *dividers); 217 - int amdgpu_atombios_get_svi2_info(struct amdgpu_device *adev, 218 - u8 voltage_type, 219 - u8 *svd_gpio_id, u8 *svc_gpio_id); 220 198 221 199 int amdgpu_atombios_get_data_table(struct amdgpu_device *adev, 222 200 uint32_t table,