From: David Heidelberg <david@ixit.cz>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Joel Selvaraj <jo@jsfamily.in>,
Jessica Zhang <jesszhan0024@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Sam Ravnborg <sam@ravnborg.org>,
Marco Mattiolo <marco.mattiolo@hotmail.it>,
Linus Walleij <linusw@kernel.org>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
phone-devel@vger.kernel.org
Subject: Re: [PATCH 3/3] drm/panel: ebbg-ft8719: Split initialization into enable/disable fn
Date: Tue, 8 Sep 2026 14:17:53 +0200 [thread overview]
Message-ID: <7f9def9e-1c2c-4856-9b92-e6417499ed74@ixit.cz> (raw)
In-Reply-To: <7d1d7726-aff1-40cf-a958-6e825a1b50eb@linaro.org>
On 08/09/2026 14:15, Neil Armstrong wrote:
> On 9/6/26 15:19, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> Efficiently this already happens with prepare/unprepare calls.
>> Remove unnecessary login and just use enable/disable functions.
>
> I would replace with:
>
> Move the MIPI commands into enable/disable callbacks since they
> are called between prepare/unprepare callbacks.
>
I'll adjust.
> Or similar.
>
>>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>> drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 17 +++++++----------
>> 1 file changed, 7 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c b/drivers/gpu/drm/
>> panel/panel-ebbg-ft8719.c
>> index 14982263a94f1..9965f46f1a316 100644
>> --- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
>> +++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
>> @@ -49,40 +49,42 @@ static void ebbg_ft8719_reset(struct ebbg_ft8719 *ctx)
>> gpiod_set_value_cansleep(ctx->reset_gpio, 0);
>> usleep_range(4000, 5000);
>> gpiod_set_value_cansleep(ctx->reset_gpio, 1);
>> usleep_range(1000, 2000);
>> gpiod_set_value_cansleep(ctx->reset_gpio, 0);
>> usleep_range(15000, 16000);
>> }
>> -static int ebbg_ft8719_on(struct ebbg_ft8719 *ctx)
>> +static int ebbg_ft8719_enable(struct drm_panel *panel)
>> {
>> + struct ebbg_ft8719 *ctx = to_ebbg_ft8719(panel);
>> struct mipi_dsi_device *dsi = ctx->dsi;
>> struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
>> dsi->mode_flags |= MIPI_DSI_MODE_LPM;
>> mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, 0x00ff);
>> mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY,
>> 0x24);
>> mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
>> mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>> mipi_dsi_msleep(&dsi_ctx, 90);
>> mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
>> return dsi_ctx.accum_err;
>> }
>> -static int ebbg_ft8719_off(struct ebbg_ft8719 *ctx)
>> +static int ebbg_ft8719_disable(struct drm_panel *panel)
>> {
>> + struct ebbg_ft8719 *ctx = to_ebbg_ft8719(panel);
>> struct mipi_dsi_device *dsi = ctx->dsi;
>> struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
>> - dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
>> + ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
>> mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
>> mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
>> mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
>> mipi_dsi_msleep(&dsi_ctx, 90);
>> return dsi_ctx.accum_err;
>
> Before the ebbg_ft8719_off() return error was ignored, perhaps you still want to
> ignore the disable return error.
Sure, make sense. Next revision will land in minutes!
Thanks
David
>
> Neil
>
>> }
>> @@ -93,30 +95,23 @@ static int ebbg_ft8719_prepare(struct drm_panel *panel)
>> int ret;
>> ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
>> if (ret < 0)
>> return ret;
>> ebbg_ft8719_reset(ctx);
>> - ret = ebbg_ft8719_on(ctx);
>> - if (ret < 0) {
>> - gpiod_set_value_cansleep(ctx->reset_gpio, 1);
>> - return ret;
>> - }
>> -
>> return 0;
>> }
>> static int ebbg_ft8719_unprepare(struct drm_panel *panel)
>> {
>> struct ebbg_ft8719 *ctx = to_ebbg_ft8719(panel);
>> - ebbg_ft8719_off(ctx);
>> gpiod_set_value_cansleep(ctx->reset_gpio, 1);
>> regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
>> return 0;
>> }
>> static const struct drm_display_mode ebbg_ft8719_mode = {
>> .clock = (1080 + 28 + 4 + 16) * (2246 + 120 + 4 + 12) * 60 / 1000,
>> @@ -148,16 +143,18 @@ static int ebbg_ft8719_get_modes(struct drm_panel *panel,
>> connector->display_info.height_mm = mode->height_mm;
>> drm_mode_probed_add(connector, mode);
>> return 1;
>> }
>> static const struct drm_panel_funcs ebbg_ft8719_panel_funcs = {
>> .prepare = ebbg_ft8719_prepare,
>> + .enable = ebbg_ft8719_enable,
>> + .disable = ebbg_ft8719_disable,
>> .unprepare = ebbg_ft8719_unprepare,
>> .get_modes = ebbg_ft8719_get_modes,
>> };
>> static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi)
>> {
>> struct device *dev = &dsi->dev;
>> struct ebbg_ft8719 *ctx;
>>
>
prev parent reply other threads:[~2026-09-08 12:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 13:19 [PATCH 0/3] Xiaomi Poco F1 (ebbg display variant) fixes David Heidelberg via B4 Relay
2026-09-06 13:19 ` [PATCH 1/3] drm/panel: ebbg-ft8719: Set prepare_prev_first David Heidelberg via B4 Relay
2026-09-06 16:15 ` Marco Mattiolo
2026-09-08 12:11 ` Neil Armstrong
2026-09-06 13:19 ` [PATCH 2/3] drm/panel: ebbg-ft8719: Fix the MODULE_LICENSE() string David Heidelberg via B4 Relay
2026-09-08 12:11 ` Neil Armstrong
2026-09-06 13:19 ` [PATCH 3/3] drm/panel: ebbg-ft8719: Split initialization into enable/disable fn David Heidelberg via B4 Relay
2026-09-08 12:15 ` Neil Armstrong
2026-09-08 12:17 ` David Heidelberg [this message]
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=7f9def9e-1c2c-4856-9b92-e6417499ed74@ixit.cz \
--to=david@ixit.cz \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=jo@jsfamily.in \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marco.mattiolo@hotmail.it \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=phone-devel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--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®