Re: [PATCH] drm/panel: novatek-nt36672a: Inline command sequences

From: Chintan Patel

Date: Fri Apr 17 2026 - 21:51:28 EST


Hi Doug,


While that may seem a lot less efficient, the design of
mipi_dsi_dcs_write_seq_multi() limits the inefficiency. Writing things
like the above also allows you to share code better. For instance, if
a second panel is added to the driver that uses the same sequence of
commands for "dimming enable", or setting the resolution, or turning
on "UI" mode, you could create a helper function to share the code.
That is impossible / awkward with the tables-based approach.

Eyeballing the table, you could also potentially optimize things a
little bit if it matters. For instance, I see a big sequence of 0x80
going to lots of registers (without seeing the panel datasheet, I
don't know why). Potentially, you could do things like:

for (uint8_t reg = 0x8b, i < 0xa0, i++)
mipi_dsi_dcs_write_var_seq_multi(dsi_ctx, reg, 0x80);

I dunno if it's worth it. You could try running bloat-o-meter to see
if the code is smaller, I guess...

[1] https://lore.kernel.org/r/CAD=FV=WtjW5WWmjeb2zwF2PjiJeZv1jZS_UKZ0bT1658=CkwVA@xxxxxxxxxxxxxx/

Thank you for the clarification and patience. I apologize for misunderstanding your initial feedback—I appreciate you taking the time to explain that the goal was to inline the command sequences as functions rather than simply removing the helper.

I will send v2.