Re: Subject: [PATCH] drm/panel : truly-nt35521: transition to mipi_dsi wrapped functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, Jun 8, 2024 at 3:57 AM Tejas Vipin <tejasvipin76@xxxxxxxxx> wrote:
>
> Use functions introduced in 966e397e4f603 ("drm/mipi-dsi: Introduce
> mipi_dsi_*_write_seq_multi()") and f79d6d28d8fe
> ("drm/mipi-dsi: wrap more functions for streamline handling") for the
> sony tulip truly nt35521 panel.

Running "scripts/checkpatch.pl" will yell about the above. You're
supposed to write the word "commit" before the git hash. AKA:

Use functions introduced in commit 966e397e4f603  ("drm/mipi-dsi:
Introduce mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8fe
("drm/mipi-dsi: wrap more functions for streamline handling") for
the...


> Signed-off-by: Tejas Vipin <tejasvipin76@xxxxxxxxx>
> ---
>  .../panel/panel-sony-tulip-truly-nt35521.c    | 383 +++++++++---------
>  1 file changed, 183 insertions(+), 200 deletions(-)

The subject of your patch has an extra "Subject:" prefix. See:

https://lore.kernel.org/r/485eef24-ddad-466a-a89f-f9f226801bb7@xxxxxxxxx

...where you can see "Subject: Subject:". Maybe use "b4" or "patman"
to help you send your patch?


> diff --git a/drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c b/drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c
> index 6d44970dccd9..13472c7c37f5 100644
> --- a/drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c
> +++ b/drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c
> @@ -44,248 +44,231 @@ static void truly_nt35521_reset(struct truly_nt35521 *ctx)
>  static int truly_nt35521_on(struct truly_nt35521 *ctx)
>  {
>         struct mipi_dsi_device *dsi = ctx->dsi;
> -       struct device *dev = &dsi->dev;
> -       int ret;
>
>         dsi->mode_flags |= MIPI_DSI_MODE_LPM;
>
> -       mipi_dsi_generic_write_seq(dsi, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00);
> -       mipi_dsi_generic_write_seq(dsi, 0xff, 0xaa, 0x55, 0xa5, 0x80);
> -       mipi_dsi_generic_write_seq(dsi, 0x6f, 0x11, 0x00);
> -       mipi_dsi_generic_write_seq(dsi, 0xf7, 0x20, 0x00);
> -       mipi_dsi_generic_write_seq(dsi, 0x6f, 0x01);
> -       mipi_dsi_generic_write_seq(dsi, 0xb1, 0x21);
> -       mipi_dsi_generic_write_seq(dsi, 0xbd, 0x01, 0xa0, 0x10, 0x08, 0x01);
> -       mipi_dsi_generic_write_seq(dsi, 0xb8, 0x01, 0x02, 0x0c, 0x02);
> -       mipi_dsi_generic_write_seq(dsi, 0xbb, 0x11, 0x11);
> -       mipi_dsi_generic_write_seq(dsi, 0xbc, 0x00, 0x00);
> -       mipi_dsi_generic_write_seq(dsi, 0xb6, 0x02);
> -       mipi_dsi_generic_write_seq(dsi, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x01);
> -       mipi_dsi_generic_write_seq(dsi, 0xb0, 0x09, 0x09);
> -       mipi_dsi_generic_write_seq(dsi, 0xb1, 0x09, 0x09);
> -       mipi_dsi_generic_write_seq(dsi, 0xbc, 0x8c, 0x00);
> -       mipi_dsi_generic_write_seq(dsi, 0xbd, 0x8c, 0x00);
> -       mipi_dsi_generic_write_seq(dsi, 0xca, 0x00);
> -       mipi_dsi_generic_write_seq(dsi, 0xc0, 0x04);
> -       mipi_dsi_generic_write_seq(dsi, 0xbe, 0xb5);
> -       mipi_dsi_generic_write_seq(dsi, 0xb3, 0x35, 0x35);
> -       mipi_dsi_generic_write_seq(dsi, 0xb4, 0x25, 0x25);
> -       mipi_dsi_generic_write_seq(dsi, 0xb9, 0x43, 0x43);
> -       mipi_dsi_generic_write_seq(dsi, 0xba, 0x24, 0x24);
> -       mipi_dsi_generic_write_seq(dsi, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x02);
> -       mipi_dsi_generic_write_seq(dsi, 0xee, 0x03);
> -       mipi_dsi_generic_write_seq(dsi, 0xb0,
> +       struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };

Please move the variable declaration above the line "dsi->mode_flags
|= MIPI_DSI_MODE_LPM;"


> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xff, 0xaa, 0x55, 0xa5, 0x80);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x6f, 0x11, 0x00);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf7, 0x20, 0x00);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x6f, 0x01);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb1, 0x21);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xbd, 0x01, 0xa0, 0x10, 0x08, 0x01);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb8, 0x01, 0x02, 0x0c, 0x02);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xbb, 0x11, 0x11);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xbc, 0x00, 0x00);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb6, 0x02);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x01);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x09, 0x09);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb1, 0x09, 0x09);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xbc, 0x8c, 0x00);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xbd, 0x8c, 0x00);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xca, 0x00);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xc0, 0x04);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xbe, 0xb5);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb3, 0x35, 0x35);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb4, 0x25, 0x25);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x43, 0x43);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xba, 0x24, 0x24);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x02);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xee, 0x03);
> +       mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0,
>                                    0x00, 0xb2, 0x00, 0xb3, 0x00, 0xb6, 0x00, 0xc3,
>                                    0x00, 0xce, 0x00, 0xe1, 0x00, 0xf3, 0x01, 0x11);

Please adjust the indentation for the followup lines to match. Right
now they line up properly with the old function name, but not the new
one.


>  static int truly_nt35521_off(struct truly_nt35521 *ctx)
>  {
>         struct mipi_dsi_device *dsi = ctx->dsi;
> -       struct device *dev = &dsi->dev;
> -       int ret;
>
>         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(50);
> +       struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };

Please move the variable declaration above the line "dsi->mode_flags
&= ~MIPI_DSI_MODE_LPM;"

-Doug




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux