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] [day] [month] [year] [list]
Message-ID: <4gdok6gfkc33sinmwjfvo2gc2wvtchom5mliucuuttqjf3diqp@buz5dty7adm2>
Date: Mon, 31 Mar 2025 00:06:35 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Tejas Vipin <tejasvipin76@...il.com>
Cc: neil.armstrong@...aro.org, maarten.lankhorst@...ux.intel.com,
        mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com,
        simona@...ll.ch, quic_jesszhan@...cinc.com, dianders@...omium.org,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        asrivats@...hat.com
Subject: Re: [PATCH] drm/panel: boe-bf060y8m-aj0: transition to mipi_dsi
 wrapped functions

On Sun, Mar 30, 2025 at 08:43:04PM +0530, Tejas Vipin wrote:
> Changes the boe-bf060y8m-aj0 panel to use multi style functions for
> improved error handling.
> 
> Signed-off-by: Tejas Vipin <tejasvipin76@...il.com>
> ---
>  .../gpu/drm/panel/panel-boe-bf060y8m-aj0.c    | 112 +++++++-----------
>  1 file changed, 43 insertions(+), 69 deletions(-)

> -static int boe_bf060y8m_aj0_off(struct boe_bf060y8m_aj0 *boe)
> +static void boe_bf060y8m_aj0_off(struct boe_bf060y8m_aj0 *boe)
>  {
>  	struct mipi_dsi_device *dsi = boe->dsi;
> -	struct device *dev = &dsi->dev;
> -	int ret;
> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
>  
>  	/* OFF commands sent in HS mode */
>  	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> -	ret = mipi_dsi_dcs_set_display_off(dsi);
> -	if (ret < 0) {
> -		dev_err(dev, "Failed to set display off: %d\n", ret);
> -		return ret;
> -	}
> -	msleep(20);
> -
> -	ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
> -	if (ret < 0) {
> -		dev_err(dev, "Failed to enter sleep mode: %d\n", ret);
> -		return ret;
> -	}
> -	usleep_range(1000, 2000);
> -	dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> +	mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
> +	mipi_dsi_msleep(&dsi_ctx, 20);
>  
> -	return 0;
> +	mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
> +	mipi_dsi_usleep_range(&dsi_ctx, 1000, 2000);
> +	if (!(dsi_ctx.accum_err))
> +		dsi->mode_flags |= MIPI_DSI_MODE_LPM;

I think the flag should always be set at the end of this function
(please document it though).

Other than that:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>


>  }
>  
>  static int boe_bf060y8m_aj0_prepare(struct drm_panel *panel)

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ