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: <a33cea9b-d998-be36-dc8c-f13e58db4fde@st.com>
Date:   Mon, 14 May 2018 08:36:43 +0000
From:   Vincent ABRIOU <vincent.abriou@...com>
To:     Philippe CORNU <philippe.cornu@...com>,
        Thierry Reding <thierry.reding@...il.com>,
        David Airlie <airlied@...ux.ie>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Andrzej Hajda <a.hajda@...sung.com>,
        Yannick FERTRE <yannick.fertre@...com>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Alexandre TORGUE <alexandre.torgue@...com>
Subject: Re: [PATCH 1/4] drm/panel: otm8009a: fix backlight updates

Hi Philippe,

Reviewed-by: Vincent Abriou <vincent.abriou@...com>

BR
Vincent

On 04/23/2018 04:10 PM, Philippe Cornu wrote:
> Backlight updates was not working anymore since the good
> implementation of the dsi lpm mode in the dsi host driver.
> After a longer analysis, the backlight updates in dsi video
> mode require the dsi hs mode.
> Note: it is important to keep the dsi lpm mode for the rest
> of the driver as init sequence, sleep in/out... dsi commands
> work in lp mode.
> 
> Signed-off-by: Philippe Cornu <philippe.cornu@...com>
> ---
>   drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 18 ++++++++++++++++--
>   1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> index 90f1ae4af93c..0fd2e0144d2b 100644
> --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> @@ -98,6 +98,20 @@ static void otm8009a_dcs_write_buf(struct otm8009a *ctx, const void *data,
>   		DRM_WARN("mipi dsi dcs write buffer failed\n");
>   }
>   
> +static void otm8009a_dcs_write_buf_hs(struct otm8009a *ctx, const void *data,
> +				      size_t len)
> +{
> +	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> +
> +	/* data will be sent in dsi hs mode (ie. no lpm) */
> +	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> +
> +	otm8009a_dcs_write_buf(ctx, data, len);
> +
> +	/* restore back the dsi lpm mode */
> +	dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> +}
> +
>   #define dcs_write_seq(ctx, seq...)			\
>   ({							\
>   	static const u8 d[] = { seq };			\
> @@ -387,7 +401,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
>   		 */
>   		data[0] = MIPI_DCS_SET_DISPLAY_BRIGHTNESS;
>   		data[1] = bd->props.brightness;
> -		otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
> +		otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
>   
>   		/* set Brightness Control & Backlight on */
>   		data[1] = 0x24;
> @@ -399,7 +413,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
>   
>   	/* Update Brightness Control & Backlight */
>   	data[0] = MIPI_DCS_WRITE_CONTROL_DISPLAY;
> -	otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
> +	otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
>   
>   	return 0;
>   }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ