Re: [PATCH 14/19] drm/panel: jadard-jd9365da-h3: support Waveshare DSI panels
From: Dmitry Baryshkov
Date: Wed Apr 08 2026 - 20:50:30 EST
On Wed, Apr 08, 2026 at 10:24:17AM +0200, Linus Walleij wrote:
> Hi Dmitry,
>
> thanks for your patch!
>
> On Wed, Apr 1, 2026 at 9:27 AM Dmitry Baryshkov
> <dmitry.baryshkov@xxxxxxxxxxxxxxxx> wrote:
>
> > Add configuration for Waveshare DSI panels using JD9365 controller.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
>
> Some more words with details on all the panels added perhaps?
:D
>
> > - desc = of_device_get_match_data(dev);
> > + jd9365da_switch_page(&dsi_ctx, 0x01);
> > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x00, 0x00);
> > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x01, 0x41);
>
> Predictably I'm not very happy with all the unexplained magic and nonestisting
> defines used here. Do you have some info/defines?
No, unfortunately.
>
> But there is also one more thing, this looks like a big "jam table"
> with just register+value tuples, so construct something like:
>
> struct jadard_jam_tbl_entry {
> u8 reg;
> u8 val;
> };
>
> static const struct jadard_jam_tbl_entry jd_3_4_c_init_jam[] = {
> {0x00, 0x00}, {0x01, 0x41}, ...};
>
> (Ideas taken from drivers/net/dsa/realtek/rtl8366rb.c, take a look
> for code and all, you get the picture.)
Few months ago the code was moved exactly in the opposite direction. We
added all _multi() functions and made shure that the code is as
efficient as the register tables. On the other hand, having it as a code
allows better control. E.g. handling 2/4 lane case would require extra
hacks to the register tables, while the code handles that without extra
hacks and without loosing effectiveness.
>
> Yours,
> Linus Walleij
--
With best wishes
Dmitry