STRUCT DC_CRTC_TIMING(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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 is 38402160, the horizontal addressable area is 3840 πŸ“
  • 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 is 38402160, the addressable area is 2160 lines, or if the resolution is 1920x1080, the addressable area is 1080 lines πŸ“Ί
  • 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