Re: [PATCH 4/8] drm/mipi-dbi: Initialize default driver functions with macro

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

 




Den 21.11.2022 11.45, skrev Thomas Zimmermann:
> Introduce DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS to initialize MIPI-DBI
> helpers to default values and convert drivers. The prepare_fb function
> set by some drivers is called implicitly by simple-kms helpers, so leave
> it out.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
> ---

>  static const struct drm_simple_display_pipe_funcs hx8357d_pipe_funcs = {
> -	.mode_valid = mipi_dbi_pipe_mode_valid,
> -	.enable = yx240qv29_enable,
> -	.disable = mipi_dbi_pipe_disable,
> -	.update = mipi_dbi_pipe_update,
> +	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(yx240qv29_enable),
>  };

>  static const struct drm_simple_display_pipe_funcs ili9163_pipe_funcs = {
> -	.mode_valid = mipi_dbi_pipe_mode_valid,
> -	.enable = yx240qv29_enable,
> -	.disable = mipi_dbi_pipe_disable,
> -	.update = mipi_dbi_pipe_update,
> +	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(yx240qv29_enable),
>  };

>  static const struct drm_simple_display_pipe_funcs ili9341_pipe_funcs = {
> -	.mode_valid = mipi_dbi_pipe_mode_valid,
> -	.enable = yx240qv29_enable,
> -	.disable = mipi_dbi_pipe_disable,
> -	.update = mipi_dbi_pipe_update,
> +	DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(yx240qv29_enable),
>  };

3 drivers have the same enable function name, ili9163 and hx8357d has
clearly copied from ili9341 which actually supports the yx240qv29 panel.
At least hx8357d managed to update the display mode variable name,
ili9163 didn't. It's not unlikely that I reviewed these drivers...

But that has nothing to do with this patch:

Reviewed-by: Noralf Trønnes <noralf@xxxxxxxxxxx>



[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