mipi_dsi_dual(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ mipi_dsi_dual β€” sending the same MIPI DSI command to two interfaces, bestie ✨

Okay so this is a page from the Kernel API Manual, and it's about a macro called mipi_dsi_dual. It's lowkey one of those "do the same thing twice without typing it twice" situations, and honestly? Iconic. Let's get into it πŸ’…


🌸 SYNOPSIS 🌸

mipi_dsi_dual (_func , _ctx , _dsi1 , _dsi2 , ... );

Like, that's the whole vibe. Four named args, then whatever else you feel like throwing in there ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • _func β€” the MIPI DSI function that you're passing your context and arguments into. It's the main character here fr.
  • _ctx β€” the context for your multiple DSI transactions. Think of it as the group chat where all the transaction gossip lives 🫢
  • _dsi1 β€” the first DSI interface, aka recipient number one of the MIPI DSI command.
  • _dsi2 β€” the second DSI interface, recipient number two. She also gets the command, no cap.
  • ... β€” the extra arguments you pass along to the MIPI DSI function or macro. All the little extras, the seasoning, the ✨spice✨.

πŸ’– DESCRIPTION πŸ’–

So here's the tea: this macro sends the specified MIPI DSI command twice β€” once for each of the two interfaces you supplied. It's giving "why say it once when you can say it to both your besties at the same time" πŸ’Œ

It's genuinely useful for reducing duplication of code in panel drivers that use two parallel serial interfaces. No more copy-pasting your command line twice like some kind of peasant, okay? We're efficient here πŸ‘‘

⚠️ Note bestie: the _func parameter cannot accept a macro such as mipi_dsi_generic_write_multi or mipi_dsi_dcs_write_buffer_multi. Nope, not those. See mipi_dsi_dual_generic_write_multi and mipi_dsi_dual_dcs_write_buffer_multi instead β€” they're the ones built for that job πŸ’…
πŸ’€ WARNING, and I need you to actually read this one: this macro reuses the _func argument and the optional trailing arguments twice each, which may cause unintended side effects. That's not a vibe. For example, adding the postfix increment ++ operator to one of the arguments to be passed to _func will cause the variable to be incremented twice instead of once β€” and the variable will be its original value + 1 when sent to _dsi2. So like... be careful, okay?? Don't let the double-execution jump-scare get you 😭

πŸ¦‹ SEE ALSO πŸ¦‹

All the related lore lives in the kernel file ./include/drm/drm_mipi_dsi.h, and here's the full cast of characters:

Go read them, iykyk πŸ“šβœ¨


🌈 Sign-off 🌈

This lil beauty lives under ./include/drm, and it's dated October 2026. That's the future, bestie β€” we're reading docs from the future and honestly? Slay. Byeee, go write some dual-interface panel driver code responsibly πŸ’œπŸŽ€


πŸ“¦ where this page comes from