forked from msm8953-mainline/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FROMGIT: drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()
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% Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/20240514102056.v5.5.Ie94246c30fe95101e0e26dd5f96e976dbeb8f242@changeid Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.5.Ie94246c30fe95101e0e26dd5f96e976dbeb8f242@changeid (cherry picked from commit 966e397) Signed-off-by: Neil Armstrong <[email protected]>
- Loading branch information
Showing
3 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -507,6 +507,24 @@ Contact: Douglas Anderson <[email protected]> | |
|
||
Level: Starter/Intermediate | ||
|
||
Transition away from using mipi_dsi_*_write_seq() | ||
------------------------------------------------- | ||
|
||
The macros mipi_dsi_generic_write_seq() and mipi_dsi_dcs_write_seq() are | ||
non-intuitive because, if there are errors, they return out of the *caller's* | ||
function. We should move all callers to use mipi_dsi_generic_write_seq_multi() | ||
and mipi_dsi_dcs_write_seq_multi() macros instead. | ||
|
||
Once all callers are transitioned, the macros and the functions that they call, | ||
mipi_dsi_generic_write_chatty() and mipi_dsi_dcs_write_buffer_chatty(), can | ||
probably be removed. Alternatively, if people feel like the _multi() variants | ||
are overkill for some use cases, we could keep the mipi_dsi_*_write_seq() | ||
variants but change them not to return out of the caller. | ||
|
||
Contact: Douglas Anderson <[email protected]> | ||
|
||
Level: Starter | ||
|
||
|
||
Core refactorings | ||
================= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters