Skip to content

Commit

Permalink
drm/panel/ili9881: logging
Browse files Browse the repository at this point in the history
  • Loading branch information
6by9 committed Sep 19, 2024
1 parent 1f4c3f6 commit 918b301
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1719,25 +1719,32 @@ static int ili9881c_prepare(struct drm_panel *panel)
instr->arg.cmd.data);

if (ret)
return ret;
pr_err("instr %u failed\n", i);
// return ret;
}

ret = ili9881c_switch_page(ctx, 0);
if (ret)
return ret;
pr_err("ili9881c_switch_page failed\n");
// return ret;

ret = mipi_dsi_dcs_set_tear_on(ctx->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
if (ret)
return ret;
pr_err("mipi_dsi_dcs_set_tear_on failed\n");
// return ret;

ret = mipi_dsi_dcs_exit_sleep_mode(ctx->dsi);
if (ret)
return ret;
pr_err("mipi_dsi_dcs_exit_sleep_mode failed\n");
// return ret;

if (ctx->desc->flags & ILI9881_FLAGS_PANEL_ON_IN_PREPARE) {
msleep(120);

ret = mipi_dsi_dcs_set_display_on(ctx->dsi);
if (ret)
pr_err("mipi_dsi_dcs_set_display_on failed\n");

}

return 0;
Expand Down Expand Up @@ -1769,13 +1776,22 @@ static int ili9881c_disable(struct drm_panel *panel)
static int ili9881c_unprepare(struct drm_panel *panel)
{
struct ili9881c *ctx = panel_to_ili9881c(panel);
int ret = 0;

msleep(50);

if (!(ctx->desc->flags & ILI9881_FLAGS_NO_SHUTDOWN_CMDS)) {
if (ctx->desc->flags & ILI9881_FLAGS_PANEL_ON_IN_PREPARE)
mipi_dsi_dcs_set_display_off(ctx->dsi);
ret = mipi_dsi_dcs_set_display_off(ctx->dsi);
if (ret)
pr_err("mipi_dsi_dcs_set_display_off failed\n");
msleep(50);

mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
ret = mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
if (ret)
pr_err("mipi_dsi_dcs_enter_sleep_mode failed\n");
}
msleep(100);

regulator_disable(ctx->power);
gpiod_set_value_cansleep(ctx->reset, 1);
Expand Down

0 comments on commit 918b301

Please sign in to comment.