Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panel: raydium-rm67200: Move initialization from enable() to prepare stage

The DSI host has different modes in prepare() and enable() functions,
prepare() is in LP command mode and enable() is in HS video mode.

>From our experience, generally the initialization sequence needs to be
sent in the LP command mode.

Move the setup init function from enable() to prepare() to fix a display
shift on rk3568 evb.

Tested on rk3568/rk3576/rk3588 EVB.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250618091520.691590-1-andyshrk@163.com

authored by

Andy Yan and committed by
Neil Armstrong
691674a2 94146121

+7 -15
+7 -15
drivers/gpu/drm/panel/panel-raydium-rm67200.c
··· 320 320 static int raydium_rm67200_prepare(struct drm_panel *panel) 321 321 { 322 322 struct raydium_rm67200 *ctx = to_raydium_rm67200(panel); 323 + struct mipi_dsi_multi_context mctx = { .dsi = ctx->dsi }; 323 324 int ret; 324 325 325 326 ret = regulator_bulk_enable(ctx->num_supplies, ctx->supplies); ··· 330 329 raydium_rm67200_reset(ctx); 331 330 332 331 msleep(60); 332 + 333 + ctx->panel_info->panel_setup(&mctx); 334 + mipi_dsi_dcs_exit_sleep_mode_multi(&mctx); 335 + mipi_dsi_msleep(&mctx, 120); 336 + mipi_dsi_dcs_set_display_on_multi(&mctx); 337 + mipi_dsi_msleep(&mctx, 30); 333 338 334 339 return 0; 335 340 } ··· 350 343 msleep(60); 351 344 352 345 return 0; 353 - } 354 - 355 - static int raydium_rm67200_enable(struct drm_panel *panel) 356 - { 357 - struct raydium_rm67200 *rm67200 = to_raydium_rm67200(panel); 358 - struct mipi_dsi_multi_context ctx = { .dsi = rm67200->dsi }; 359 - 360 - rm67200->panel_info->panel_setup(&ctx); 361 - mipi_dsi_dcs_exit_sleep_mode_multi(&ctx); 362 - mipi_dsi_msleep(&ctx, 120); 363 - mipi_dsi_dcs_set_display_on_multi(&ctx); 364 - mipi_dsi_msleep(&ctx, 30); 365 - 366 - return ctx.accum_err; 367 346 } 368 347 369 348 static int raydium_rm67200_disable(struct drm_panel *panel) ··· 376 383 .prepare = raydium_rm67200_prepare, 377 384 .unprepare = raydium_rm67200_unprepare, 378 385 .get_modes = raydium_rm67200_get_modes, 379 - .enable = raydium_rm67200_enable, 380 386 .disable = raydium_rm67200_disable, 381 387 }; 382 388