[PATCH v3 5/9] drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()
Linus Walleij
linus.walleij at linaro.org
Mon May 6 06:22:27 UTC 2024
On Wed, May 1, 2024 at 5:43 PM Douglas Anderson <dianders at chromium.org> wrote:
> The current mipi_dsi_*_write_seq() macros are non-intutitive because
> they contain a hidden "return" statement that will return out of the
> _caller_ of the macro. Let's mark them as deprecated and instead
> introduce some new macros that are more intuitive.
>
> These new macros are less optimal when an error occurs but should
> behave more optimally when there is no error. Specifically these new
> macros cause smaller code to get generated and the code size savings
> (less to fetch from RAM, less cache space used, less RAM used) are
> important. Since the error case isn't something we need to optimize
> for and these new macros are easier to understand and more flexible,
> they should be used.
>
> After converting to use these new functions, one example shows some
> nice savings while also being easier to understand.
>
> $ scripts/bloat-o-meter \
> ...after/panel-novatek-nt36672e.ko \
> ...ctx/panel-novatek-nt36672e.ko
> add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-988 (-988)
> Function old new delta
> nt36672e_1080x2408_60hz_init 6236 5248 -988
> Total: Before=10651, After=9663, chg -9.28%
>
> Signed-off-by: Douglas Anderson <dianders at chromium.org>
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
Yours,
Linus Walleij
More information about the dri-devel
mailing list