STRUCT DC_CRTC_TIMING(9)
π NAME π
okay so welcome to the Kernel API Manual entry for struct dc_crtc_timing(9) β and bestie, this one is literally the blueprint for configuring DCN blocks π
struct dc_crtc_timing β Timing parameters used to configure DCN blocks β¨
πΈ SYNOPSIS πΈ
here's the whole struct, copied exactly because I would never do you dirty like that:
struct dc_crtc_timing {
uint32_t h_total;
uint32_t h_border_left;
uint32_t h_addressable;
uint32_t h_border_right;
uint32_t h_front_porch;
uint32_t h_sync_width;
uint32_t v_total;
uint32_t v_border_top;
uint32_t v_addressable;
uint32_t v_border_bottom;
uint32_t v_front_porch;
uint32_t v_sync_width;
uint32_t pix_clk_100hz;
uint32_t min_refresh_in_uhz;
uint32_t max_refresh_in_uhz;
uint32_t vic;
uint32_t hdmi_vic;
uint32_t rid;
uint32_t fr_index;
uint32_t frl_uncompressed_video_bandwidth_in_kbps;
enum dc_timing_3d_format timing_3d_format;
enum dc_color_depth display_color_depth;
enum dc_pixel_encoding pixel_encoding;
enum dc_aspect_ratio aspect_ratio;
enum scanning_type scan_type;
struct dc_crtc_timing_flags flags;
uint32_t dsc_fixed_bits_per_pixel_x16;
struct dc_dsc_config dsc_cfg;
uint32_t expanded_hblank;
};
π¦ Members π¦
okay so these are the ones the manual actually walks you through β taking notes? βοΈ
h_totalβ the total number of pixels, counted from the rising edge of HSync all the way until the rising edge of the current HSync. like a full lap πββοΈh_border_leftβ the black pixels related to the left border π€h_addressableβ the range of pixels displayed horizontally. for example, if the display resolution is38402160, the horizontal addressable area is3840πh_border_rightβ the black pixels related to the right border π€h_front_porchβ period (in pixels) between HBlank start and the rising edge of HSync β±οΈh_sync_widthβ HSync duration in pixels β¨v_totalβ the total number of lines from the rising edge of the previous VSync until the rising edge of the current VSync. and the manual hits you with this little diagram, so here it is, untouched:
|--------------------------| +-+ V_TOTAL +-+ | |
VSync ---+ +--------- // -----------+ +---
v_border_topβ the black border on the top β¬οΈv_addressableβ the range of the scanout at which the framebuffer is displayed. for example, if the display resolution is38402160, the addressable area is2160lines, or if the resolution is1920x1080, the addressable area is1080lines πΊv_border_bottomβ the black border on the bottom β¬οΈv_front_porchβ period (in lines) between VBlank start and rising edge of VSync. and yeah, another diagram, verbatim, you're welcome π«Ά
+-+ VSync | | ----------+ +--------...
+------------------... VBlank | --+ |-------|
v_front_porch
v_sync_widthβ VSync signal width in lines πpix_clk_100hzβ pipe pixel precision π«
and lowkey this one matters: this field is used to communicate pixel clocks with 100 Hz accuracy from dc_crtc_timing to BIOS command table π₯
real talk though β the synopsis lists a bunch of members (min_refresh_in_uhz,max_refresh_in_uhz,vic,hdmi_vic,rid,fr_index,frl_uncompressed_video_bandwidth_in_kbps,timing_3d_format,display_color_depth,pixel_encoding,aspect_ratio,scan_type,flags,dsc_fixed_bits_per_pixel_x16,dsc_cfg,expanded_hblank) that this page does not give a write-up for. I'm not gonna invent lore for them β they're in the struct, that's what the docs say, periodt π
π Description π
so DCN provides multiple signals and parameters that can be used to adjust timing parameters, and this struct aggregates multiple of these values for easy access β like a little timing starter pack π
in this struct, the fields prefixed with h_* are related to horizontal timing, and v_* to vertical timing. iykyk πΈ
keep in mind β and this is the part people fumble β when we talk about vertical timings, the values are, in general, described in the number of lines π§΅ on the other hand, the horizontal values are in pixels πΌοΈ
π SEE ALSO π
go touch grass in the kernel tree, bestie:
- Kernel file
./drivers/gpu/drm/amd/display/dc/dc_hw_types.h - struct
dc_cursor_position(9) - enum
dc_cursor_color_format(9)
and that's the whole page, no cap π this came to you straight from ./drivers/gpu/drm/amd/display/dc, dated October 2026, and yes β the main character of this page is struct dc_crtc_timing(9) π«Άβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms