* [PATCH 0/3] Xiaomi Poco F1 (ebbg display variant) fixes
@ 2026-09-06 13:19 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
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-09-06 13:19 UTC (permalink / raw)
To: Joel Selvaraj, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Sam Ravnborg, Marco Mattiolo, Linus Walleij
Cc: dri-devel, linux-kernel, phone-devel, David Heidelberg,
Casey Connolly, stable
Been broken in mainline for some time.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Casey Connolly (1):
drm/panel: ebbg-ft8719: Set prepare_prev_first
David Heidelberg (2):
drm/panel: ebbg-ft8719: Fix the MODULE_LICENSE() string
drm/panel: ebbg-ft8719: Split initialization into enable/disable fn
drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
---
base-commit: 7079a12d7506b07fb53b54a664bfad5fa9b16d70
change-id: 20260122-ebbg-ft8719-fixups-bce548250b02
Best regards,
--
David Heidelberg <david@ixit.cz>
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/3] drm/panel: ebbg-ft8719: Set prepare_prev_first 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 ` 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-06 13:19 ` [PATCH 3/3] drm/panel: ebbg-ft8719: Split initialization into enable/disable fn David Heidelberg via B4 Relay 2 siblings, 2 replies; 9+ messages in thread From: David Heidelberg via B4 Relay @ 2026-09-06 13:19 UTC (permalink / raw) To: Joel Selvaraj, Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Marco Mattiolo, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel, David Heidelberg, Casey Connolly, stable From: Casey Connolly <casey.connolly@linaro.org> This corrects the host initialisation sequence so that we can send DSI/DCS commands in prepare(). Cc: stable@vger.kernel.org Fixes: b00de0e237da ("drm/panel: introduce ebbg,ft8719 panel") Signed-off-by: Casey Connolly <casey.connolly@linaro.org> Signed-off-by: David Heidelberg <david@ixit.cz> --- drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c index fb9f9f42be4f2..1ab09c50a6306 100644 --- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c +++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c @@ -193,16 +193,18 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi) ctx->dsi = dsi; mipi_dsi_set_drvdata(dsi, ctx); dsi->lanes = 4; dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_CLOCK_NON_CONTINUOUS; + ctx->panel.prepare_prev_first = true; + ret = drm_panel_of_backlight(&ctx->panel); if (ret) return dev_err_probe(dev, ret, "Failed to get backlight\n"); drm_panel_add(&ctx->panel); ret = mipi_dsi_attach(dsi); if (ret < 0) { -- 2.55.0 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] drm/panel: ebbg-ft8719: Set prepare_prev_first 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 1 sibling, 0 replies; 9+ messages in thread From: Marco Mattiolo @ 2026-09-06 16:15 UTC (permalink / raw) To: david, Joel Selvaraj, Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel, Casey Connolly, stable Il 06/09/26 3:19 PM, David Heidelberg via B4 Relay ha scritto: > From: Casey Connolly <casey.connolly@linaro.org> > > This corrects the host initialisation sequence so that we can send > DSI/DCS commands in prepare(). > > Cc: stable@vger.kernel.org > Fixes: b00de0e237da ("drm/panel: introduce ebbg,ft8719 panel") > Signed-off-by: Casey Connolly <casey.connolly@linaro.org> > Signed-off-by: David Heidelberg <david@ixit.cz> > --- Tested-by: Marco Mattiolo <marco.mattiolo@hotmail.it> Marco ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] drm/panel: ebbg-ft8719: Set prepare_prev_first 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 1 sibling, 0 replies; 9+ messages in thread From: Neil Armstrong @ 2026-09-08 12:11 UTC (permalink / raw) To: david, Joel Selvaraj, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Marco Mattiolo, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel, Casey Connolly, stable On 9/6/26 15:19, David Heidelberg via B4 Relay wrote: > From: Casey Connolly <casey.connolly@linaro.org> > > This corrects the host initialisation sequence so that we can send > DSI/DCS commands in prepare(). > > Cc: stable@vger.kernel.org > Fixes: b00de0e237da ("drm/panel: introduce ebbg,ft8719 panel") > Signed-off-by: Casey Connolly <casey.connolly@linaro.org> > Signed-off-by: David Heidelberg <david@ixit.cz> > --- > drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c > index fb9f9f42be4f2..1ab09c50a6306 100644 > --- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c > +++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c > @@ -193,16 +193,18 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi) > ctx->dsi = dsi; > mipi_dsi_set_drvdata(dsi, ctx); > > dsi->lanes = 4; > dsi->format = MIPI_DSI_FMT_RGB888; > dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | > MIPI_DSI_CLOCK_NON_CONTINUOUS; > > + ctx->panel.prepare_prev_first = true; > + > ret = drm_panel_of_backlight(&ctx->panel); > if (ret) > return dev_err_probe(dev, ret, "Failed to get backlight\n"); > > drm_panel_add(&ctx->panel); > > ret = mipi_dsi_attach(dsi); > if (ret < 0) { > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Thanks, Neil ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] drm/panel: ebbg-ft8719: Fix the MODULE_LICENSE() string 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 13:19 ` 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 2 siblings, 1 reply; 9+ messages in thread From: David Heidelberg via B4 Relay @ 2026-09-06 13:19 UTC (permalink / raw) To: Joel Selvaraj, Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Marco Mattiolo, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel, David Heidelberg From: David Heidelberg <david@ixit.cz> Replace the bogus "GPL v2" with "GPL" as MODULE_LICNSE() string. The value does not declare the module's exact license, but only lets the module loader test whether the module is Free Software or not. See commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") in the details of the issue. The fix is to use "GPL" for all modules under any variant of the GPL. Signed-off-by: David Heidelberg <david@ixit.cz> --- drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c index 1ab09c50a6306..14982263a94f1 100644 --- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c +++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c @@ -241,9 +241,9 @@ static struct mipi_dsi_driver ebbg_ft8719_driver = { .name = "panel-ebbg-ft8719", .of_match_table = ebbg_ft8719_of_match, }, }; module_mipi_dsi_driver(ebbg_ft8719_driver); MODULE_AUTHOR("Joel Selvaraj <jo@jsfamily.in>"); MODULE_DESCRIPTION("DRM driver for EBBG FT8719 video dsi panel"); -MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("GPL"); -- 2.55.0 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] drm/panel: ebbg-ft8719: Fix the MODULE_LICENSE() string 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 0 siblings, 0 replies; 9+ messages in thread From: Neil Armstrong @ 2026-09-08 12:11 UTC (permalink / raw) To: david, Joel Selvaraj, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Marco Mattiolo, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel On 9/6/26 15:19, David Heidelberg via B4 Relay wrote: > From: David Heidelberg <david@ixit.cz> > > Replace the bogus "GPL v2" with "GPL" as MODULE_LICNSE() string. The > value does not declare the module's exact license, but only lets the > module loader test whether the module is Free Software or not. > > See commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. > "GPL v2" bogosity") in the details of the issue. The fix is to use > "GPL" for all modules under any variant of the GPL. > > Signed-off-by: David Heidelberg <david@ixit.cz> > --- > drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c > index 1ab09c50a6306..14982263a94f1 100644 > --- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c > +++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c > @@ -241,9 +241,9 @@ static struct mipi_dsi_driver ebbg_ft8719_driver = { > .name = "panel-ebbg-ft8719", > .of_match_table = ebbg_ft8719_of_match, > }, > }; > module_mipi_dsi_driver(ebbg_ft8719_driver); > > MODULE_AUTHOR("Joel Selvaraj <jo@jsfamily.in>"); > MODULE_DESCRIPTION("DRM driver for EBBG FT8719 video dsi panel"); > -MODULE_LICENSE("GPL v2"); > +MODULE_LICENSE("GPL"); > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Thanks, Neil ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] drm/panel: ebbg-ft8719: Split initialization into enable/disable fn 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 13:19 ` [PATCH 2/3] drm/panel: ebbg-ft8719: Fix the MODULE_LICENSE() string David Heidelberg via B4 Relay @ 2026-09-06 13:19 ` David Heidelberg via B4 Relay 2026-09-08 12:15 ` Neil Armstrong 2 siblings, 1 reply; 9+ messages in thread From: David Heidelberg via B4 Relay @ 2026-09-06 13:19 UTC (permalink / raw) To: Joel Selvaraj, Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Marco Mattiolo, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel, David Heidelberg From: David Heidelberg <david@ixit.cz> Efficiently this already happens with prepare/unprepare calls. Remove unnecessary login and just use enable/disable functions. 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; } @@ -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; -- 2.55.0 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] drm/panel: ebbg-ft8719: Split initialization into enable/disable fn 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 0 siblings, 1 reply; 9+ messages in thread From: Neil Armstrong @ 2026-09-08 12:15 UTC (permalink / raw) To: david, Joel Selvaraj, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Marco Mattiolo, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel 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. 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. 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; > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] drm/panel: ebbg-ft8719: Split initialization into enable/disable fn 2026-09-08 12:15 ` Neil Armstrong @ 2026-09-08 12:17 ` David Heidelberg 0 siblings, 0 replies; 9+ messages in thread From: David Heidelberg @ 2026-09-08 12:17 UTC (permalink / raw) To: Neil Armstrong, Joel Selvaraj, Jessica Zhang, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter, Sam Ravnborg, Marco Mattiolo, Linus Walleij Cc: dri-devel, linux-kernel, phone-devel 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; >> > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-09-08 12:17 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 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®