From: Jani Nikula <jani.nikula@linux.intel.com>
To: Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>,
neil.armstrong@linaro.org, quic_jesszhan@quicinc.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, dianders@chromium.org, hsinyi@google.com,
airlied@gmail.com, daniel@ffwll.ch, jagan@edgeble.ai
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
Subject: Re: [PATCH v1 1/2] drm/panel: jd9365da: Move the sending location of the 11/29 command
Date: Thu, 25 Jul 2024 11:41:44 +0300 [thread overview]
Message-ID: <87o76lzwvr.fsf@intel.com> (raw)
In-Reply-To: <20240725083245.12253-2-lvzhaoxiong@huaqin.corp-partner.google.com>
On Thu, 25 Jul 2024, Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com> wrote:
> Move the 11/29 command from enable() to init() function
OOC, what is the "11/29" command?
BR,
Jani.
>
> As mentioned in the patch:
> https://lore.kernel.org/all/20240624141926.5250-2-lvzhaoxiong@huaqin.corp-partner.google.com/
>
> Our DSI host has different modes in prepare() and enable()
> functions. prepare() is in LP mode and enable() is in HS mode.
> Since the 11/29 command must also be sent in LP mode,
> so we also move 11/29 command to the init() function.
>
> After moving the 11/29 command to the init() function,
> we no longer need additional delay judgment, so we delete
> variables "exit_sleep_to_display_on_delay_ms" and
> "display_on_delay_ms".
>
> Signed-off-by: Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
> ---
> .../gpu/drm/panel/panel-jadard-jd9365da-h3.c | 59 ++++++++++---------
> 1 file changed, 32 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
> index 04d315d96bff..ce73e8cb1db5 100644
> --- a/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
> +++ b/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
> @@ -31,8 +31,6 @@ struct jadard_panel_desc {
> bool reset_before_power_off_vcioo;
> unsigned int vcioo_to_lp11_delay_ms;
> unsigned int lp11_to_reset_delay_ms;
> - unsigned int exit_sleep_to_display_on_delay_ms;
> - unsigned int display_on_delay_ms;
> unsigned int backlight_off_to_display_off_delay_ms;
> unsigned int display_off_to_enter_sleep_delay_ms;
> unsigned int enter_sleep_to_reset_down_delay_ms;
> @@ -66,26 +64,6 @@ static inline struct jadard *panel_to_jadard(struct drm_panel *panel)
> return container_of(panel, struct jadard, panel);
> }
>
> -static int jadard_enable(struct drm_panel *panel)
> -{
> - struct jadard *jadard = panel_to_jadard(panel);
> - struct mipi_dsi_multi_context dsi_ctx = { .dsi = jadard->dsi };
> -
> - msleep(120);
> -
> - mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> -
> - if (jadard->desc->exit_sleep_to_display_on_delay_ms)
> - mipi_dsi_msleep(&dsi_ctx, jadard->desc->exit_sleep_to_display_on_delay_ms);
> -
> - mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> -
> - if (jadard->desc->display_on_delay_ms)
> - mipi_dsi_msleep(&dsi_ctx, jadard->desc->display_on_delay_ms);
> -
> - return dsi_ctx.accum_err;
> -}
> -
> static int jadard_disable(struct drm_panel *panel)
> {
> struct jadard *jadard = panel_to_jadard(panel);
> @@ -202,7 +180,6 @@ static const struct drm_panel_funcs jadard_funcs = {
> .disable = jadard_disable,
> .unprepare = jadard_unprepare,
> .prepare = jadard_prepare,
> - .enable = jadard_enable,
> .get_modes = jadard_get_modes,
> .get_orientation = jadard_panel_get_orientation,
> };
> @@ -382,6 +359,12 @@ static int radxa_display_8hd_ad002_init_cmds(struct jadard *jadard)
>
> jd9365da_switch_page(&dsi_ctx, 0x00);
>
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> +
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> +
> return dsi_ctx.accum_err;
> };
>
> @@ -608,6 +591,12 @@ static int cz101b4001_init_cmds(struct jadard *jadard)
> mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xE6, 0x02);
> mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xE7, 0x0C);
>
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> +
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> +
> return dsi_ctx.accum_err;
> };
>
> @@ -831,6 +820,16 @@ static int kingdisplay_kd101ne3_init_cmds(struct jadard *jadard)
>
> jd9365da_switch_page(&dsi_ctx, 0x00);
>
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> +
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> +
> + mipi_dsi_msleep(&dsi_ctx, 20);
> +
> return dsi_ctx.accum_err;
> };
>
> @@ -859,8 +858,6 @@ static const struct jadard_panel_desc kingdisplay_kd101ne3_40ti_desc = {
> .reset_before_power_off_vcioo = true,
> .vcioo_to_lp11_delay_ms = 5,
> .lp11_to_reset_delay_ms = 10,
> - .exit_sleep_to_display_on_delay_ms = 120,
> - .display_on_delay_ms = 20,
> .backlight_off_to_display_off_delay_ms = 100,
> .display_off_to_enter_sleep_delay_ms = 50,
> .enter_sleep_to_reset_down_delay_ms = 100,
> @@ -1074,6 +1071,16 @@ static int melfas_lmfbx101117480_init_cmds(struct jadard *jadard)
> mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe6, 0x02);
> mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe7, 0x06);
>
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> +
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> +
> + mipi_dsi_msleep(&dsi_ctx, 20);
> +
> return dsi_ctx.accum_err;
> };
>
> @@ -1102,8 +1109,6 @@ static const struct jadard_panel_desc melfas_lmfbx101117480_desc = {
> .reset_before_power_off_vcioo = true,
> .vcioo_to_lp11_delay_ms = 5,
> .lp11_to_reset_delay_ms = 10,
> - .exit_sleep_to_display_on_delay_ms = 120,
> - .display_on_delay_ms = 20,
> .backlight_off_to_display_off_delay_ms = 100,
> .display_off_to_enter_sleep_delay_ms = 50,
> .enter_sleep_to_reset_down_delay_ms = 100,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-07-25 8:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 8:32 [PATCH v1 0/2] Modify the method of sending 11/29 commands Zhaoxiong Lv
2024-07-25 8:32 ` [PATCH v1 1/2] drm/panel: jd9365da: Move the sending location of the 11/29 command Zhaoxiong Lv
2024-07-25 8:41 ` Jani Nikula [this message]
2024-07-26 1:17 ` zhaoxiong lv
2024-07-26 8:06 ` Jani Nikula
2024-07-27 16:59 ` Dmitry Baryshkov
2024-07-29 3:10 ` zhaoxiong lv
2024-07-29 20:09 ` Dmitry Baryshkov
2024-08-05 2:38 ` zhaoxiong lv
2024-08-05 15:56 ` Doug Anderson
2024-07-25 8:32 ` [PATCH v1 2/2] drm/panel: jd9365da: Modify the init code of Melfas Zhaoxiong Lv
2024-07-26 18:38 ` Jessica Zhang
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=87o76lzwvr.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hsinyi@google.com \
--cc=jagan@edgeble.ai \
--cc=linux-kernel@vger.kernel.org \
--cc=lvzhaoxiong@huaqin.corp-partner.google.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--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;
as well as URLs for NNTP newsgroup(s).