mipi_dsi_dual(9)
β¨ 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_funcparameter cannot accept a macro such asmipi_dsi_generic_write_multiormipi_dsi_dcs_write_buffer_multi. Nope, not those. Seemipi_dsi_dual_generic_write_multiandmipi_dsi_dual_dcs_write_buffer_multiinstead β they're the ones built for that job π
π WARNING, and I need you to actually read this one: this macro reuses the_funcargument 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_funcwill 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:
struct mipi_dsi_msg(9)struct mipi_dsi_packet(9)struct mipi_dsi_host_ops(9)struct mipi_dsi_host(9)struct mipi_dsi_device_info(9)struct mipi_dsi_device(9)struct mipi_dsi_multi_context(9)mipi_dsi_pixel_format_to_bpp(9)enum mipi_dsi_dcs_tear_mode(9)mipi_dsi_generic_write_seq_multi(9)mipi_dsi_generic_write_var_seq_multi(9)mipi_dsi_dcs_write_seq_multi(9)mipi_dsi_dcs_write_var_seq_multi(9)mipi_dsi_dual_generic_write_seq_multi(9)mipi_dsi_dual_dcs_write_seq_multi(9)struct mipi_dsi_driver(9)
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
- 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