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: Fri, 3 May 2024 09:32:48 -0700
From: Doug Anderson <dianders@...omium.org>
To: dri-devel@...ts.freedesktop.org
Cc: Linus Walleij <linus.walleij@...aro.org>, Jani Nikula <jani.nikula@...ux.intel.com>, 
	Dmitry Baryshkov <dmitry.baryshkov@...aro.org>, 
	Cong Yang <yangcong5@...qin.corp-partner.google.com>, Hsin-Yi Wang <hsinyi@...gle.com>, 
	Brian Norris <briannorris@...omium.org>, Sam Ravnborg <sam@...nborg.org>, 
	Neil Armstrong <neil.armstrong@...aro.org>, Javier Martinez Canillas <javierm@...hat.com>, 
	Joel Selvaraj <jo@...amily.in>, lvzhaoxiong@...qin.corp-partner.google.com, 
	Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...il.com>, 
	Jessica Zhang <quic_jesszhan@...cinc.com>, 
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 9/9] drm/panel: innolux-p079zca: Don't use a table for
 initting panels

Hi,

On Wed, May 1, 2024 at 8:43 AM Douglas Anderson <dianders@...omium.org> wrote:
>
> @@ -132,33 +125,9 @@ static int innolux_panel_prepare(struct drm_panel *panel)
>         /* p079zca: t4, p097pfg: t5 */
>         usleep_range(20000, 21000);
>
> -       if (innolux->desc->init_cmds) {
> -               const struct panel_init_cmd *cmds =
> -                                       innolux->desc->init_cmds;
> -               unsigned int i;
> -
> -               for (i = 0; cmds[i].len != 0; i++) {
> -                       const struct panel_init_cmd *cmd = &cmds[i];
> -
> -                       err = mipi_dsi_generic_write(innolux->link, cmd->data,
> -                                                    cmd->len);
> -                       if (err < 0) {
> -                               dev_err(panel->dev, "failed to write command %u\n", i);
> -                               goto poweroff;
> -                       }
> -
> -                       /*
> -                        * Included by random guessing, because without this
> -                        * (or at least, some delay), the panel sometimes
> -                        * didn't appear to pick up the command sequence.
> -                        */
> -                       err = mipi_dsi_dcs_nop(innolux->link);
> -                       if (err < 0) {
> -                               dev_err(panel->dev, "failed to send DCS nop: %d\n", err);
> -                               goto poweroff;
> -                       }
> -               }
> -       }
> +       err = innolux->desc->init(innolux);
> +       if (err < 0)
> +               goto poweroff;

FWIW, I happened to notice a bug in the above by code inspection. The
old code checked "if (innolux->desc->init_cmds)" and thus handled
init_cmds being NULL. The new code doesn't handle the init function
being NULL. One of the two panels in this file (which seems to have no
users in mainline) doesn't specify an init sequence.

I'll spin this next week with the extra "if" test.

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ