Skip to content

drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs

Douglas Anderson dri-devel linux-doc lkml 4 versions – Applied

Status from this message: Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 1 replyApplied
  2. v49 patches 4 repliesSuperseded
  3. v39 patches 19 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v28 patches14 repliesSuperseded

Changes in v5 from the cover letter

- Fix comment dev_err_ratelimited() => dev_err().

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/9drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq()include/drm/drm_mipi_dsi.h+12 -120 replies
2/9drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_generic_write_seq()include/drm/drm_mipi_dsi.h+11 -110 replies
3/9drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit printsinclude/drm/drm_mipi_dsi.h+11 -130 replies
4/9drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq()drivers/gpu/drm/drm_mipi_dsi.c include/drm/drm_mipi_dsi.h+82 -210 replies
5/9drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()Documentation/gpu/todo.rst drivers/gpu/drm/drm_mipi_dsi.c include/drm/drm_mipi_dsi.h+136 -00 replies
6/9drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi()drivers/gpu/drm/panel/panel-novatek-nt36672e.c+289 -2870 replies
7/9drm/panel: boe-tv101wum-nl6: Don't use a table for initting panelsdrivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c+1442 -13500 replies
8/9drm/panel: ili9882t: Don't use a table for initting panelsdrivers/gpu/drm/panel/panel-ilitek-ili9882t.c+368 -4260 replies
9/9drm/panel: innolux-p079zca: Don't use a table for initting panelsdrivers/gpu/drm/panel/panel-innolux-p079zca.c+140 -1440 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchNeil ArmstrongLinus WalleijDmitry Baryshkov
1/9R-b R-b
2/9R-b R-b
3/9R-b R-b
4/9R-b R-b R-b
5/9R-b R-b
6/9R-b R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/9] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs

The consensus of many DRM folks is that we want to move away from DSI drivers defining tables of init commands. Instead, we want to move to init functions that can use common DRM functions. The issue thus far has been that using the macros mipi_dsi_generic_write_seq() and mipi_dsi_dcs_write_seq() bloats the driver using them.

While trying to solve bloat, we realized that the majority of the it was easy to solve. This series solves the bloat for existing drivers by moving the printout outside of the macro.

During discussion of my v1 patch to fix the bloat [1], we also decided that we really want to change the way that drivers deal with init sequences to make it clearer. In addition to being cleaner, a side effect of moving drivers to the new style reduces bloat _even more_.

This series also contains a few minor fixes / cleanups that I found along the way.

This series converts four drivers over to the new mipi_dsi_dcs_write_seq_multi() function. Not all conversions have been tested, but hopefully they are straightforward enough. I'd appreciate testing.

NOTE: In v3 I tried to incorporate the feedback from v2. I also converted the other two panels I could find that used table-based initialization.

v4 just has a tiny bugfix and collects tags. v5 has another tiny bugfix. Assuming no other problems are found the plan is to land this series sometime roughly around May 16 [2].

[1] https://lore.kernel.org/r/20240424172017.1.Id15fae80582bc74a0d4f1338987fa375738f45b9@changeid
[2] https://lore.kernel.org/r/[email protected]

Changes in v5:
- Fix comment dev_err_ratelimited() => dev_err().

Changes in v4:
- Test to see if init is non-NULL before using it.
- Update wording as per Linus W.

Changes in v3:
- ("mipi_dsi_*_write functions don't need to ratelimit...") moved earlier.
- Add a TODO item for cleaning up the deprecated macros/functions.
- Fix spacing of init function.
- Inline kerneldoc comments for struct mipi_dsi_multi_context.
- Rebased upon patch to remove ratelimit of prints.
- Remove an unneeded error print.
- Squash boe-tv101wum-nl6 lowercase patch into main patch
- Use %zd in print instead of casting errors to int.
- drm/panel: ili9882t: Don't use a table for initting panels
- drm/panel: innolux-p079zca: Don't use a table for initting panels

Changes in v2:
- Add some comments to the macros about printing and returning.
- Change the way err value is handled in prep for next patch.
- Modify commit message now that this is part of a series.
- Rebased upon patches to avoid theoretical int overflow.
- drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq()
- drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_generic_write_seq()
- drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()
- drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit prints
- drm/panel: boe-tv101wum-nl6: Convert hex to lowercase
- drm/panel: boe-tv101wum-nl6: Don't use a table for initting commands
- drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi()

Douglas Anderson (9):
drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq() drm/mipi-dsi: Fix theoretical int overflow in
mipi_dsi_generic_write_seq()
drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit
prints
drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq() drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi() drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi() drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels drm/panel: ili9882t: Don't use a table for initting panels drm/panel: innolux-p079zca: Don't use a table for initting panels

 Documentation/gpu/todo.rst                    |   18 +
 drivers/gpu/drm/drm_mipi_dsi.c                |  112 +
 .../gpu/drm/panel/panel-boe-tv101wum-nl6.c    | 2792 +++++++++--------
 drivers/gpu/drm/panel/panel-ilitek-ili9882t.c |  794 +++--
 drivers/gpu/drm/panel/panel-innolux-p079zca.c |  284 +-
 .../gpu/drm/panel/panel-novatek-nt36672e.c    |  576 ++--
 include/drm/drm_mipi_dsi.h                    |  101 +-
 7 files changed, 2452 insertions(+), 2225 deletions(-)
Signature · 1 line
2.45.0.rc1.225.g2a3ae87e7f-goog