summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDavid Heidelberg <david@ixit.cz>2026-09-08 14:45:04 +0200
committerNeil Armstrong <neil.armstrong@linaro.org>2026-09-24 15:39:52 +0200
commit012dc8a8e5b6bca57ef7bb62d6015faff7690e0a (patch)
treeb291a775587ac53403aba34a59d8107812795b8a /drivers/gpu
parentb1885bd1c985999b8a5393f2e23eea8dde3109a9 (diff)
drm/panel: ebbg-ft8719: Split initialization into enable/disable fn
Move the MIPI commands into enable/disable callbacks since they are called between prepare/unprepare callbacks. Signed-off-by: David Heidelberg <david@ixit.cz> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260908-ebbg-ft8719-fixups-v2-3-5454ae1f5581@ixit.cz
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/panel/panel-ebbg-ft8719.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
index 14982263a94f..1652de70900f 100644
--- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
+++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
@@ -54,8 +54,9 @@ static void ebbg_ft8719_reset(struct ebbg_ft8719 *ctx)
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 };
@@ -72,19 +73,20 @@ static int ebbg_ft8719_on(struct ebbg_ft8719 *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;
+ return 0;
}
static int ebbg_ft8719_prepare(struct drm_panel *panel)
@@ -98,12 +100,6 @@ static int ebbg_ft8719_prepare(struct drm_panel *panel)
ebbg_ft8719_reset(ctx);
- ret = ebbg_ft8719_on(ctx);
- if (ret < 0) {
- gpiod_set_value_cansleep(ctx->reset_gpio, 1);
- return ret;
- }
-
return 0;
}
@@ -111,7 +107,6 @@ 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);
@@ -153,6 +148,8 @@ static int ebbg_ft8719_get_modes(struct drm_panel *panel,
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,
};