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]
Date: Wed, 19 Jun 2024 12:52:57 +0530
From: Tejas Vipin <tejasvipin76@...il.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: neil.armstrong@...aro.org, quic_jesszhan@...cinc.com,
 dianders@...omium.org, maarten.lankhorst@...ux.intel.com,
 mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com, daniel@...ll.ch,
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/panel: raydium-rm692e5: transition to mipi_dsi
 wrapped functions



On 6/19/24 12:06 PM, Dmitry Baryshkov wrote:
> On Wed, Jun 19, 2024 at 09:03:49AM GMT, Tejas Vipin wrote:
>> Use functions introduced in commit 966e397e4f60 ("drm/mipi-dsi: Introduce
>> mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8fe
>> ("drm/mipi-dsi: wrap more functions for streamline handling") for the
>> raydium rm692e5 panel.
>>
>> Signed-off-by: Tejas Vipin <tejasvipin76@...il.com>
>> ---
>> Changes in v2:
>>     - Change rm692e5_on to return void and take mipi_dsi_multi_context
>>       as an argument.
>>     - Remove unnecessary warnings.
>>     - More efficient error handling in rm692e5_prepare
>>
>> v1: https://lore.kernel.org/all/20240615093758.65431-1-tejasvipin76@gmail.com/
>> ---
>>  drivers/gpu/drm/panel/panel-raydium-rm692e5.c | 237 ++++++++----------
>>  1 file changed, 99 insertions(+), 138 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
>> index 21d97f6b8a2f..9936bda61af2 100644
>> --- a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
>> +++ b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
> 
>>  static int rm692e5_prepare(struct drm_panel *panel)
>>  {
>>  	struct rm692e5_panel *ctx = to_rm692e5_panel(panel);
>>  	struct drm_dsc_picture_parameter_set pps;
>> -	struct device *dev = &ctx->dsi->dev;
>> -	int ret;
>> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
>>  
>> -	ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
>> -	if (ret < 0) {
>> -		dev_err(dev, "Failed to enable regulators: %d\n", ret);
>> -		return ret;
>> -	}
>> +	dsi_ctx.accum_err = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
>> +	if (dsi_ctx.accum_err)
>> +		return dsi_ctx.accum_err;
> 
> int ret, please. Let's leave dsi_ctx.accum_err for DSI errors only.
> LGTM otherwise.

Is this really necessary seeing how regulator_bulk_enable returns
0 on success anyways? It saves creating a new variable for a single
check. In case you do think its necessary, should it be changed in
himax_hx83102 too?

> 
>>  
>>  	rm692e5_reset(ctx);
>>  
>> -	ret = rm692e5_on(ctx);
>> -	if (ret < 0) {
>> -		dev_err(dev, "Failed to initialize panel: %d\n", ret);
>> -		gpiod_set_value_cansleep(ctx->reset_gpio, 1);
>> -		regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
>> -		return ret;
>> -	}
>> +	rm692e5_on(&dsi_ctx);
>>  
> 
> 

-- 
---
Tejas Vipin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ