[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=X0Tn+=M8oYsxtT=g7etQ1Fsusn_O3_K4MD=n2rQRdxJg@mail.gmail.com>
Date: Mon, 24 Mar 2025 09:36:28 -0700
From: Doug Anderson <dianders@...omium.org>
To: Tejas Vipin <tejasvipin76@...il.com>
Cc: neil.armstrong@...aro.org, maarten.lankhorst@...ux.intel.com,
mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com, simona@...ll.ch,
lujianhua000@...il.com, quic_jesszhan@...cinc.com,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
asrivats@...hat.com
Subject: Re: [PATCH v4] drm/panel: novatek-nt36523: transition to mipi_dsi
wrapped functions
Hi,
On Sat, Mar 15, 2025 at 11:25 AM Tejas Vipin <tejasvipin76@...il.com> wrote:
>
> Changes the novatek-nt36523 panel to use multi style functions for
> improved error handling.
>
> Reviewed-by: Douglas Anderson <dianders@...omium.org>
> Signed-off-by: Tejas Vipin <tejasvipin76@...il.com>
> ---
> Changes in v4:
> - Cleanup nt36523_prepare
>
> Link to v3: https://lore.kernel.org/all/20250309040355.381386-1-tejasvipin76@gmail.com/
>
> Changes in v3:
> - Remove mipi_dsi_dual_msleep
> - Change mipi_dsi_dual_dcs_write_seq_multi to use the same dsi_ctx
> by swapping the dsi accordingly.
>
> Link to v2: https://lore.kernel.org/all/20250307091519.245889-1-tejasvipin76@gmail.com/
>
> Changes in v2:
> - Uses mipi_dsi_dual_msleep
> - Changed mipi_dsi_dual_dcs_write_seq_multi to not equate accum_err
> of either dsi_ctx.
>
> Link to v1: https://lore.kernel.org/all/20250306134350.139792-1-tejasvipin76@gmail.com/
> ---
> drivers/gpu/drm/panel/panel-novatek-nt36523.c | 1683 ++++++++---------
> 1 file changed, 823 insertions(+), 860 deletions(-)
When applying, I did get a yell from the stricter checkpatch mode:
-:28: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dsi_ctx' - possible
side-effects?
#28: FILE: drivers/gpu/drm/panel/panel-novatek-nt36523.c:26:
+#define mipi_dsi_dual_dcs_write_seq_multi(dsi_ctx, dsi0, dsi1, cmd,
seq...) \
+ do {
\
+ dsi_ctx.dsi = dsi0;
\
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, cmd,
seq); \
+ dsi_ctx.dsi = dsi1;
\
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, cmd,
seq); \
} while (0)
That's not new though, so I went ahead and applied the patch anyway. I
think the easiest way to solve it is to just assign "cmd" to a local
variable inside the "do {} while(0)" scope. Pushed to drm-misc-next:
[1/1] drm/panel: novatek-nt36523: transition to mipi_dsi wrapped functions
commit: 15a226179c55ffef2e0a883b6bc15eaceff4a08d
Powered by blists - more mailing lists