Re: [PATCH v5 4/4] drm/panel: p079zca: support Innolux P097PFG panel

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

 



On Mon, Jul 02, 2018 at 12:27:21PM +0200, Heiko Stuebner wrote:
> From: Lin Huang <hl@xxxxxxxxxxxxxx>
> 
> Support Innolux P097PFG 9.7" 1536x2048 TFT LCD panel, it reuse
> the Innolux P079ZCA panel driver.
> 
> Changes in v2:
> - None
> Changes in v3:
> - None
> Changes in v4:
> - None
> Changes in v5:
> - Document source of init-commands
> - 4 lanes per DSI interface
> 
> Signed-off-by: Lin Huang <hl@xxxxxxxxxxxxxx>
> Signed-off-by: Heiko Stuebner <heiko@xxxxxxxxx>
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 200 +++++++++++++++++-
>  1 file changed, 196 insertions(+), 4 deletions(-)

Applied with two small changes, see below.

> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index 630b0c2549ef..8d25b87bfbd6 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> @@ -20,6 +20,15 @@
>  
>  #include <video/mipi_display.h>
>  
> +struct panel_init_cmd {
> +	int len;

I changed the type here to size_t for consistency.

> +	const char *data;
> +};
> +
> +#define _INIT_CMD(...) { \
> +	.len = sizeof((char[]){__VA_ARGS__}), \
> +	.data = (char[]){__VA_ARGS__} }
> +
>  struct panel_desc {
>  	const struct drm_display_mode *modes;
>  	unsigned int bpc;
> @@ -30,6 +39,7 @@ struct panel_desc {
>  
>  	unsigned long flags;
>  	enum mipi_dsi_pixel_format format;
> +	const struct panel_init_cmd *init_cmds;
>  	unsigned int lanes;
>  	const char * const *supply_names;
>  	unsigned int num_supplies;
> @@ -121,13 +131,43 @@ static int innolux_panel_prepare(struct drm_panel *panel)
>  	if (err < 0)
>  		return err;
>  
> -	/* T2: 15ms - 1000ms */
> -	usleep_range(15000, 16000);
> +	/* p079zca: t2 (20ms), p097pfg: t4 (15ms) */
> +	usleep_range(20000, 21000);
>  
>  	gpiod_set_value_cansleep(innolux->enable_gpio, 1);
>  
> -	/* T4: 15ms - 1000ms */
> -	usleep_range(15000, 16000);
> +	/* p079zca: t4, p097pfg: t5 */
> +	usleep_range(20000, 21000);
> +
> +	if (innolux->desc->init_cmds) {
> +		const struct panel_init_cmd *cmds =
> +					innolux->desc->init_cmds;
> +		int i;

I made this unsigned.

Thierry

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux