lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f29335b2-47c3-46c1-b183-f623a940f54d@linaro.org>
Date: Mon, 30 Jun 2025 17:32:38 +0200
From: neil.armstrong@...aro.org
To: Andy Yan <andyshrk@....com>
Cc: quic_jesszhan@...cinc.com, mripard@...nel.org, simona@...ll.ch,
 tzimmermann@...e.de, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org, sebastian.reichel@...labora.com,
 Andy Yan <andy.yan@...k-chips.com>
Subject: Re: [PATCH] drm/panel: raydium-rm67200: Move initialization from
 enable() to prepare stage

On 18/06/2025 11:15, Andy Yan wrote:
> From: Andy Yan <andy.yan@...k-chips.com>
> 
> 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@...k-chips.com>
> ---
> 
>   drivers/gpu/drm/panel/panel-raydium-rm67200.c | 22 ++++++-------------
>   1 file changed, 7 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67200.c b/drivers/gpu/drm/panel/panel-raydium-rm67200.c
> index df6c1727237b5..459381d53847f 100644
> --- a/drivers/gpu/drm/panel/panel-raydium-rm67200.c
> +++ b/drivers/gpu/drm/panel/panel-raydium-rm67200.c
> @@ -320,6 +320,7 @@ static void w552793baa_setup(struct mipi_dsi_multi_context *ctx)
>   static int raydium_rm67200_prepare(struct drm_panel *panel)
>   {
>   	struct raydium_rm67200 *ctx = to_raydium_rm67200(panel);
> +	struct mipi_dsi_multi_context mctx = { .dsi = ctx->dsi };
>   	int ret;
>   
>   	ret = regulator_bulk_enable(ctx->num_supplies, ctx->supplies);
> @@ -330,6 +331,12 @@ static int raydium_rm67200_prepare(struct drm_panel *panel)
>   
>   	msleep(60);
>   
> +	ctx->panel_info->panel_setup(&mctx);
> +	mipi_dsi_dcs_exit_sleep_mode_multi(&mctx);
> +	mipi_dsi_msleep(&mctx, 120);
> +	mipi_dsi_dcs_set_display_on_multi(&mctx);
> +	mipi_dsi_msleep(&mctx, 30);
> +
>   	return 0;
>   }
>   
> @@ -345,20 +352,6 @@ static int raydium_rm67200_unprepare(struct drm_panel *panel)
>   	return 0;
>   }
>   
> -static int raydium_rm67200_enable(struct drm_panel *panel)
> -{
> -	struct raydium_rm67200 *rm67200 = to_raydium_rm67200(panel);
> -	struct mipi_dsi_multi_context ctx = { .dsi = rm67200->dsi };
> -
> -	rm67200->panel_info->panel_setup(&ctx);
> -	mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
> -	mipi_dsi_msleep(&ctx, 120);
> -	mipi_dsi_dcs_set_display_on_multi(&ctx);
> -	mipi_dsi_msleep(&ctx, 30);
> -
> -	return ctx.accum_err;
> -}
> -
>   static int raydium_rm67200_disable(struct drm_panel *panel)
>   {
>   	struct raydium_rm67200 *rm67200 = to_raydium_rm67200(panel);
> @@ -383,7 +376,6 @@ static const struct drm_panel_funcs raydium_rm67200_funcs = {
>   	.prepare = raydium_rm67200_prepare,
>   	.unprepare = raydium_rm67200_unprepare,
>   	.get_modes = raydium_rm67200_get_modes,
> -	.enable = raydium_rm67200_enable,
>   	.disable = raydium_rm67200_disable,
>   };
>   

Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ