dsi_adjust_..._compression(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… dsi_adjust_pclk_for_compression โ€” a.k.a. the dsi_adjust_..._compression(9) kernel API page, bestie edition ๐ŸŽ€

okay so welcome to the group chat, this is the manual page for dsi_adjust_pclk_for_compression(9) from the Kernel API Manual and honestly? she's a niche little icon and I'm obsessed. grab a matcha, we're doing DRM/DSI math together ๐Ÿงšโœจ


๐ŸŒธ NAME ๐ŸŒธ

dsi_adjust_pclk_for_compression โ€” adjusts the pclk rate for the compression case. that's it, that's the whole vibe. she tweaks your pixel clock so compression math actually works out ๐Ÿ’…


โœจ SYNOPSIS โœจ

unsigned long dsi_adjust_pclk_for_compression (const struct
       drm_display_mode *mode , const struct drm_dsc_config *dsc , bool
       is_bonded_dsi );

like, she returns an unsigned long (the new pclk rate, bestie) and takes three whole arguments. three! main character energy fr fr ๐Ÿ‘‘


๐Ÿซถ ARGUMENTS ๐Ÿซถ

  • mode โ€” the selected mode for the DSI output. the whole reason we're here, lowkey.
  • dsc โ€” the DRM DSC configuration for this DSI output. yes queen, tell us about your compression.
  • is_bonded_dsi โ€” a bool. True if two DSI controllers are bonded. two controllers holding hands. bonded, if you will ๐Ÿซถ๐Ÿซถ

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so what does she actually do? she adjusts the pclk rate by calculating a new hdisplay that's proportional to the compression ratio, and the formula is giving very much:

new_hdisplay = old_hdisplay * compressed_bpp / uncompressed_bpp

periodt. that's the math. ๐Ÿงฎโœจ

๐Ÿฆ‹ and the porches? not adjusted. not even a little.

porches do not need to be adjusted, and here's the receipts:

  • For VIDEO mode โ€” they are not compressed by DSC and are passed as is. untouched. unbothered. thriving. ๐Ÿ’€
  • For CMD mode โ€” there are no actual porches. instead, these fields currently represent the overhead to the image data transfer. so they're calculated for the final mode parameters (after the compression) and are not to be adjusted too. no cap, leave them alone ๐Ÿ™ˆ
FIXME: Reconsider this if/when CMD mode handling is rewritten to use transfer time and data overhead as a starting point of the calculations. basically a little note-to-self for future her, and we respect the honesty ๐Ÿ˜ญ๐ŸŒธ

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

  • the kernel file ./drivers/gpu/drm/msm/dsi/dsi_host.c โ€” go read it, iykyk ๐Ÿ“–๐Ÿ’œ

and that's the page, bestie!! ๐ŸŽ€ if you made it this far you're literally a kernel girlie now. this icon dropped in October 2026 as part of the ./drivers/gpu/drm/msm/dsi situation, so go forth, adjust those pclk rates, and slay ๐Ÿ’…๐Ÿ”ฅ๐ŸŒˆโญ๐Ÿ’–

๐Ÿ“ฆ where this page comes from