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, };