linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs
@ 2024-04-26 23:58 Douglas Anderson
  2024-04-26 23:58 ` [PATCH v2 1/8] drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq() Douglas Anderson
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Douglas Anderson @ 2024-04-26 23:58 UTC (permalink / raw)
  To: dri-devel
  Cc: Linus Walleij, lvzhaoxiong, Jani Nikula, Hsin-Yi Wang,
	Javier Martinez Canillas, Neil Armstrong, Joel Selvaraj,
	Dmitry Baryshkov, Cong Yang, Sam Ravnborg, Douglas Anderson,
	Daniel Vetter, David Airlie, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, linux-kernel

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 two drivers over to the new
mipi_dsi_dcs_write_seq_multi() function. I don't have any hardware
that uses the mipi_dsi_generic_write_seq() function to test with, so I
haven't converted anything over to use that. The conversions are
straightforward but I'd appreciate testing.

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

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

Douglas Anderson (8):
  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: Reduce driver bloat of mipi_dsi_*_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: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi()
  drm/panel: boe-tv101wum-nl6: Don't use a table for initting commands
  drm/panel: boe-tv101wum-nl6: Convert hex to lowercase

 drivers/gpu/drm/drm_mipi_dsi.c                |  112 +
 .../gpu/drm/panel/panel-boe-tv101wum-nl6.c    | 2712 +++++++++--------
 .../gpu/drm/panel/panel-novatek-nt36672e.c    |  524 ++--
 include/drm/drm_mipi_dsi.h                    |   96 +-
 4 files changed, 1818 insertions(+), 1626 deletions(-)

-- 
2.44.0.769.g3c40516874-goog


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-05-06  6:21 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 23:58 [PATCH v2 0/8] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs Douglas Anderson
2024-04-26 23:58 ` [PATCH v2 1/8] drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq() Douglas Anderson
2024-04-27  1:44   ` Dmitry Baryshkov
2024-04-27  6:22     ` Sam Ravnborg
2024-04-29 21:42       ` Doug Anderson
2024-04-26 23:58 ` [PATCH v2 2/8] drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_generic_write_seq() Douglas Anderson
2024-04-26 23:58 ` [PATCH v2 3/8] drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq() Douglas Anderson
2024-04-27  2:05   ` Dmitry Baryshkov
2024-04-26 23:58 ` [PATCH v2 4/8] drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi() Douglas Anderson
2024-04-27  6:32   ` Sam Ravnborg
2024-04-29 14:13     ` Doug Anderson
2024-04-29  9:38   ` Neil Armstrong
2024-04-29 14:26     ` Doug Anderson
2024-04-29 15:39       ` Jani Nikula
2024-05-01 15:49         ` Doug Anderson
2024-05-01 15:57           ` Dmitry Baryshkov
2024-05-06  6:21       ` Linus Walleij
2024-04-26 23:58 ` [PATCH v2 5/8] drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit prints Douglas Anderson
2024-04-26 23:58 ` [PATCH v2 6/8] drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi() Douglas Anderson
2024-04-26 23:58 ` [PATCH v2 7/8] drm/panel: boe-tv101wum-nl6: Don't use a table for initting commands Douglas Anderson
2024-04-26 23:58 ` [PATCH v2 8/8] drm/panel: boe-tv101wum-nl6: Convert hex to lowercase Douglas Anderson
2024-04-27  8:48   ` Dmitry Baryshkov
2024-04-29  9:20 ` [PATCH v2 0/8] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).