Skip to content

Commit dca84cc

Browse files
dos1superna9999
authored andcommitted
drm/panel: mantix: Improve power on sequence timings
FP8006P datasheet mentions: > It is necessary to wait 15msec after releasing RESX before sending > commands. Also Sleep Out command cannot be sent for 120 msec. This hasn't been respected by the driver so far, which could interfere with the LCD init code sequence performed by the controller. In some cases this leads to VCOM voltage being set to a wrong value, causing "halo" effects, temporary burn-in around the edges of the screen and degraded image contrast. T3 and T4 are counted from when VDDI is enabled. There's no need to add them when we've already waited more than that in T2 and T2d. While FT8006P datasheet does not mention a delay between exiting sleep mode and turning the display on, code provided by the vendor uses 120ms there and it happens to be the same value as required in newer datasheets for newer controllers from the same family, so it seems appropriate to use it here as well. Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260105-mantix-halo-fixes-v1-2-1ebc9b195a34@puri.sm
1 parent ef789ce commit dca84cc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ static void mantix_init_sequence(struct mipi_dsi_multi_context *dsi_ctx)
5858

5959
mipi_dsi_generic_write_seq_multi(dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5a, 0x09);
6060
mipi_dsi_generic_write_seq_multi(dsi_ctx, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00);
61-
mipi_dsi_msleep(dsi_ctx, 20);
6261

6362
mipi_dsi_generic_write_seq_multi(dsi_ctx, MANTIX_CMD_SPI_FINISH, 0xa5);
6463
mipi_dsi_generic_write_seq_multi(dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2f);
65-
mipi_dsi_msleep(dsi_ctx, 20);
6664
}
6765

6866
static int mantix_enable(struct drm_panel *panel)
@@ -75,8 +73,11 @@ static int mantix_enable(struct drm_panel *panel)
7573
if (!dsi_ctx.accum_err)
7674
dev_dbg(ctx->dev, "Panel init sequence done\n");
7775

76+
/* remainder to 120ms (7.3.1 Note 4) */
77+
mipi_dsi_msleep(&dsi_ctx, 70);
78+
7879
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
79-
mipi_dsi_msleep(&dsi_ctx, 20);
80+
mipi_dsi_msleep(&dsi_ctx, 120);
8081

8182
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
8283
mipi_dsi_usleep_range(&dsi_ctx, 10000, 12000);
@@ -147,10 +148,10 @@ static int mantix_prepare(struct drm_panel *panel)
147148
return ret;
148149
}
149150

150-
/* T3 + T4 + time for voltage to become stable: */
151-
usleep_range(6000, 7000);
152-
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
151+
usleep_range(100, 200);
153152
gpiod_set_value_cansleep(ctx->tp_rstn_gpio, 0);
153+
usleep_range(100, 200);
154+
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
154155

155156
/* T6 */
156157
msleep(50);

0 commit comments

Comments
 (0)