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: <c389ea3e-70cb-46c5-8cf1-878a99f771ec@gmail.com>
Date: Wed, 30 Oct 2024 12:54:13 +0530
From: Tejas Vipin <tejasvipin76@...il.com>
To: Doug Anderson <dianders@...omium.org>
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, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/panel: leadtek-ltk050h3146w: transition to mipi_dsi
 wrapped functions



On 10/29/24 12:24 AM, Doug Anderson wrote:
> Hi,
> 
> On Fri, Oct 25, 2024 at 9:00 PM Tejas Vipin <tejasvipin76@...il.com> wrote:
>>
>> @@ -418,79 +398,42 @@ static const struct ltk050h3146w_desc ltk050h3146w_data = {
>>                 MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET,
>>  };
>>
>> -static int ltk050h3146w_a2_select_page(struct ltk050h3146w *ctx, int page)
>> +static void ltk050h3146w_a2_select_page(struct mipi_dsi_multi_context *dsi_ctx, int page)
>>  {
>> -       struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
>> -       u8 d[3] = { 0x98, 0x81, page };
>> +       u8 d[4] = { 0xff, 0x98, 0x81, page };
>>
>> -       return mipi_dsi_dcs_write(dsi, 0xff, d, ARRAY_SIZE(d));
>> +       mipi_dsi_dcs_write_buffer_multi(dsi_ctx, d, ARRAY_SIZE(d));
> 
> FWIW: the above might be slightly better as:
> 
> mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0xff, 0x98, 0x81, page);
> 
> That would make it more documenting that the 0xff is the "cmd", has
> fewer lines of code, and also gets the array marked as "static const"
> which might make the compiler slightly more efficient. ;-)
> 
> Not really a huge deal, though.
>

I did try this initially, but got an error because of page not being a
compile time constant. Not sure how I should handle this.

> Reviewed-by: Douglas Anderson <dianders@...omium.org>

-- 
Tejas Vipin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ