From: Chintan Patel <chintanlike@gmail.com>
To: Alexey Minnekhanov <alexeymin@minlexx.ru>,
sumit.semwal@linaro.org, neil.armstrong@linaro.org
Cc: dianders@chromium.org, jesszhan0024@gmail.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] drm/panel: novatek-nt36672a: Inline panel init sequences
Date: Tue, 26 May 2026 21:17:30 -0700 [thread overview]
Message-ID: <24a8d461-7393-4a37-b23c-3cbf44060350@gmail.com> (raw)
In-Reply-To: <ace48664-cd7e-4cb8-8940-04ffe6f93e19@minlexx.ru>
>> @@ -162,8 +141,8 @@ static int nt36672a_panel_prepare(struct drm_panel
>> *panel)
>> dsi_ctx.accum_err = nt36672a_panel_power_on(pinfo);
>> /* send first part of init cmds */
>> - nt36672a_send_cmds(&dsi_ctx, pinfo->desc->on_cmds_1,
>> - pinfo->desc->num_on_cmds_1);
>> + if (pinfo->desc->send_init_cmds_1)
>> + pinfo->desc->send_init_cmds_1(&dsi_ctx);
>> mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>> @@ -173,8 +152,8 @@ static int nt36672a_panel_prepare(struct drm_panel
>> *panel)
>> mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
>> /* Send rest of the init cmds */
>> - nt36672a_send_cmds(&dsi_ctx, pinfo->desc->on_cmds_2,
>> - pinfo->desc->num_on_cmds_2);
>> + if (pinfo->desc->send_init_cmds_2)
>> + pinfo->desc->send_init_cmds_2(&dsi_ctx);
>> mipi_dsi_msleep(&dsi_ctx, 120);
>
> Hi!
>
> Here, the split of panel init sequence into 2 separate functions _1 / _2
> is completely artificial and completely unnecessary. For some unknown
> reason the initial version of driver had initialization procedure cut in
> 2 parts on the boundary of exit_sleep_mode + set_display_on commands.
>
> I think the whole init sequence should be glued together into one big
> send_init_cmds() callback and have all these calls:
>
> mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> /* 0x46 = 70 ms delay */
> mipi_dsi_msleep(&dsi_ctx, 70);
> mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
>
>
> included in the middle. This opens up a possibility for other panels
> based on nt36672a to be supported in this driver, which don't have the
> init sequence split this way. The location of exit_sleep_mode and
> set_display_on commands there is different. And, importantly, the delay
> is different too.
>
> I once did a very similar change to this driver [1] to add support for
> more panels (ignore touchscreen changes there, look only at panel).
> What is also important, that change was also tested on Xiaomi Poco F1
> (xiaomi-beryllium) phone, which is the main user of this panel.
> Unfortunately I never got to send it, even though I wanted to..
>
> What do you think?
>
> [1] https://gitlab.com/sdm845-mainline/linux/-/merge_requests/131
Hi Alexey,
Thanks, that makes sense and I agree the fully panel-owned init sequence
would likely be a cleaner abstraction long term, especially for
supporting additional NT36672A panel variants with different sequencing
requirements.
For this patch, though, I was trying to keep the scope limited to the
original refactor requested during earlier review:
remove the command table abstraction,
inline the command sequences,
and preserve the existing init flow/behavior as closely as possible.
Since moving exit_sleep_mode, delays, and set_display_on into the panel
callback changes the sequencing model itself, I was thinking it may be
better handled as a follow-up cleanup/refactor patch to avoid mixing
behavioral restructuring into this series.
If that sounds reasonable, I'd prefer to keep this patch focused and
address the sequencing abstraction separately afterward.
Regards,
Chintan
next prev parent reply other threads:[~2026-05-27 4:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 3:57 Chintan Patel
2026-05-25 14:46 ` Alexey Minnekhanov
2026-05-27 4:17 ` Chintan Patel [this message]
2026-06-03 1:06 ` Doug Anderson
2026-06-04 21:22 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24a8d461-7393-4a37-b23c-3cbf44060350@gmail.com \
--to=chintanlike@gmail.com \
--cc=airlied@gmail.com \
--cc=alexeymin@minlexx.ru \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®