CDCLK RAWCLK(9)
π CDCLK / RAWCLK β the kernel API manual, section 9, bestie edition π
okay so sit down, grab a strawberry, because we're talking about CDCLK / RAWCLK β yes this is a section 9 kernel API man page and yes it's lowkey iconic. this is the Kernel API Manual lore and honestly it ate. πβ¨
π DESCRIPTION (the vibes, explained)
the display engine uses several different clocks to do its work, because of course it does, main character energy. but there are two main clocks involved that aren't directly related to the actual pixel clock or any symbol/bit clock of the actual output port. those two besties are:
- the core display clock (CDCLK)
- RAWCLK
π CDCLK β the queen bee
CDCLK clocks most of the display pipe logic, so its frequency must be high enough to support the rate at which pixels are flowing through the pipes. and downscaling has to be accounted for too, because that increases the effective pixel rate. math is math, periodt. β¨
on several platforms the CDCLK frequency can be changed dynamically to minimize power consumption for a given display configuration. but heads up: typically, changes to the CDCLK frequency require all the display pipes to be shut down while the frequency is being changed. no multitasking, bestie. π
on SKL+ the DMC will toggle the CDCLK off/on during DC5/6 entry/exit. the DMC will not change the active CDCLK frequency though, so that part is still performed by the driver directly. teamwork, i guess. π«Ά
π§ the CDCLK glow-up crew (multiple components involved in generating the CDCLK frequency)
- the CDCLK PLL β generates an output clock based on a reference clock and a ratio parameter π₯
- the CD2X Divider β divides the output of the PLL based on a divisor selected from a set of pre-defined choices
- the CD2X Squasher β further divides the output based on a waveform represented as a sequence of bits where each zero "squashes out" a clock cycle π
- and finally, a fixed divider that divides the output frequency by
2
so as such, the resulting CDCLK frequency can be calculated with this formula, and no i will not gatekeep it:
cdclk = vco / cd2x_div / (sq_len / sq_div) / 2
where:
vcois the frequency generated by the PLLcd2x_divrepresents the CD2X Dividersq_lenandsq_divare the bit length and the number of high bits for the CD2X Squasher waveform, respectively2represents the fixed divider
ngl, some older platforms do not contain the CD2X Divider and/or CD2X Squasher β in which case we can just ignore their respective factors in the formula above. slay, less math for us. π
π how to actually change the CDCLK frequency
several methods exist, and which ones are supported depends on the platform:
- Full PLL disable + re-enable with new VCO frequency. pipes must be inactive. π
- CD2X divider update. single pipe can be active, since the divider update can be synchronized with the pipe's start of vblank.
- Crawl the PLL smoothly to the new VCO frequency. pipes can be active. β¨
- Squash waveform update. pipes can be active.
- Crawl and squash can also be done back to back. pipes can be active. π₯
π¦ RAWCLK β the low-maintenance icon
RAWCLK is a fixed frequency clock, often used by various auxiliary blocks such as AUX CH or backlight PWM. so the only thing we really need to know about RAWCLK is its frequency, so that various dividers can be programmed correctly. that's it. that's the whole personality. π
πΈ SEE ALSO
kernel file ./drivers/gpu/drm/i915/display/intel_cdclk.c
and the whole friend group:
intel_cdclk_init_hw(9)intel_cdclk_uninit_hw(9)intel_cdclk_clock_changed(9)intel_cdclk_can_cd2x_update(9)intel_cdclk_changed(9)intel_set_cdclk_pre_plane_update(9)intel_set_cdclk_post_plane_update(9)intel_update_max_cdclk(9)intel_update_cdclk(9)intel_read_rawclk(9)intel_init_cdclk_hooks(9)
and that's the page, bestie π this little gem lives in ./drivers/gpu/drm/i915/display, it's dated October 2026, and it's filed under CDCLK / RAWCLK(9) β go forth and clock responsibly, iykyk. πβ¨π
π¦ 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