Re: drm/panel: Add panel-mipi-dsi-bringup

From: Linus Walleij
Date: Tue May 23 2023 - 13:31:43 EST


On Tue, May 16, 2023 at 9:52 AM Paulo Pavačić <pavacic.p@xxxxxxxxx> wrote:

> From 118419935002e076b44292c832e9b26106f93c89 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Paulo=20Pava=C4=8Di=C4=87?= <pavacic.p@xxxxxxxxx>
> Date: Fri, 12 May 2023 17:38:29 +0200
> Subject: [PATCH] drm/panel: add panel-mipi-dsi-bringup driver
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit

This header is really mangled. I wonder what happened?

> +//macro for writing to DSI
> +#define WRITE_DSI(dsi, seq...)
> \
> + { \
> + const u8 d[] = { seq }; \
> + int ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \
> + if (ret < 0) { \
> + dev_err(&dsi->dev, \
> + "Error (%d) occurred while trying to" \
> + " write MIPI DSI command: %s (decimal value)\n", \
> + ret, d); \
> + } \
> + }

This is reinventing
mipi_dsi_generic_write_seq() from <drm/drm_mipi_dsi.h>
so use that instead.

> +static void brup_panel_fannal_c3004_enable_function(struct
> mipi_dsi_device *dsi)

Doesn't look like a good name for a generic function?

> + WRITE_DSI(dsi, 0xFF, 0x77, 0x01, 0x00, 0x00, 0x13);

Use
mipi_dsi_generic_write_seq()

I suppose these review comments go fo rthe c3004 driver too.

Yours,
Linus Walleij