[PATCH v6 2/4] drm/panel: jdi-lpm102a188a: Fix bug and clean up driver

Doug Anderson dianders at chromium.org
Tue Jul 22 16:31:58 UTC 2025


Hi,

On Mon, Jul 21, 2025 at 6:53 PM Brigham Campbell <me at brighamcampbell.com> wrote:
>
> Fix bug in unprepare() which causes the function's return value to be
> that of the last mipi "enter sleep mode" command.
>
> Update driver to use the "multi" variant of MIPI functions in order to
> facilitate improved error handling and remove the panel's dependency on
> deprecated MIPI functions.
>
> Use the new mipi_dsi_dual macro to reduce code duplication.
>
> Reviewed-by: Douglas Anderson <dianders at chromium.org>
> Reviewed-by: Diogo Ivo <diogo.ivo at tecnico.ulisboa.pt>
> Tested-by: Diogo Ivo <diogo.ivo at tecnico.ulisboa.pt>
> Signed-off-by: Brigham Campbell <me at brighamcampbell.com>
> ---
>  drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 196 ++++++------------
>  1 file changed, 59 insertions(+), 137 deletions(-)

Just for fun, I ran bloat-o-meter to compare before and after.

add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-217 (-217)
Function                                     old     new   delta
jdi_write_dcdc_registers.d                    10       5      -5
jdi_panel_unprepare                          312     260     -52
jdi_panel_prepare                           1020     860    -160
Total: Before=4908, After=4691, chg -4.42%

...not as big of a savings, but that's not too surprising in this case
since we don't have the whole pile of "seq" functions. Still the point
was making the driver cleaner and the space savings is just an extra
bonus!

-Doug


More information about the dri-devel mailing list