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

Noralf Trønnes noralf at tronnes.org
Fri Nov 25 17:05:13 UTC 2022



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 at suse.de>
> ---

>  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 at tronnes.org>


More information about the dri-devel mailing list