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

drm/amd/display: Document some of the DML structs

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rodrigo Siqueira and committed by
Alex Deucher
db910f10 bf0dec46

+34
+34
drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
··· 26 26 #include "dc_features.h" 27 27 #include "display_mode_enums.h" 28 28 29 + /** 30 + * DOC: overview 31 + * 32 + * Most of the DML code is automatically generated and tested via hardware 33 + * description language. Usually, we use the reference _vcs_dpi in the code 34 + * where VCS means "Verilog Compiled Simulator" and DPI stands for "Direct 35 + * Programmer Interface". In other words, those structs can be used to 36 + * interface with Verilog with other languages such as C. 37 + */ 38 + 29 39 #ifndef __DISPLAY_MODE_STRUCTS_H__ 30 40 #define __DISPLAY_MODE_STRUCTS_H__ 31 41 ··· 169 159 double dtbclk_mhz; 170 160 }; 171 161 162 + /** 163 + * _vcs_dpi_soc_bounding_box_st: SOC definitions 164 + * 165 + * This struct maintains the SOC Bounding Box information for the ASIC; it 166 + * defines things such as clock, voltage, performance, etc. Usually, we load 167 + * these values from VBIOS; if something goes wrong, we use some hard-coded 168 + * values, which will enable the ASIC to light up with limitations. 169 + */ 172 170 struct _vcs_dpi_soc_bounding_box_st { 173 171 struct _vcs_dpi_voltage_scaling_st clock_limits[DC__VOLTAGE_STATES]; 174 172 /* ··· 184 166 * clock table. Do not use outside of *update_bw_boudning_box functions. 185 167 */ 186 168 struct _vcs_dpi_voltage_scaling_st _clock_tmp[DC__VOLTAGE_STATES]; 169 + 170 + /** 171 + * @num_states: It represents the total of Display Power Management 172 + * (DPM) supported by the specific ASIC. 173 + */ 187 174 unsigned int num_states; 188 175 double sr_exit_time_us; 189 176 double sr_enter_plus_exit_time_us; ··· 254 231 enum self_refresh_affinity allow_dram_self_refresh_or_dram_clock_change_in_vblank; 255 232 }; 256 233 234 + /** 235 + * @_vcs_dpi_ip_params_st: IP configuraion for DCN blocks 236 + * 237 + * In this struct you can find the DCN configuration associated to the specific 238 + * ASIC. For example, here we can save how many DPPs the ASIC is using and it 239 + * is available. 240 + * 241 + */ 257 242 struct _vcs_dpi_ip_params_st { 258 243 bool use_min_dcfclk; 259 244 bool clamp_min_dcfclk; ··· 314 283 unsigned int writeback_line_buffer_chroma_buffer_size; 315 284 316 285 unsigned int max_page_table_levels; 286 + /** 287 + * @max_num_dpp: Maximum number of DPP supported in the target ASIC. 288 + */ 317 289 unsigned int max_num_dpp; 318 290 unsigned int max_num_otg; 319 291 unsigned int cursor_chunk_size;